I've tried so much with my account. Having server 587 on my mac makes no difference whilst my iPhone won't accept it.
The mail on my mac comes up with the message that it can't send the message using the server and to try a difference outgoing mail server which I don't have. When I check the connection doctor it says that the connection has succeeded with login and no login required.
I tried the suggestion with terminal and it says after I've typed the suggested:
mail.example.com: nodename nor servname provided, or not known
I assume this means there is a problem with the connection which is confusing considering the connection doctor and that I do receive mail.
With my iPhone the error message says that the server has rejected the mail so it can't send regardless if where I send it.
Thanks so much for the help so far. I'd really appreciate it if there is anymore anyone can suggsest either to help or just the cause.