Troubleshooting sending mail from the iPhone with AT&T
If you are having problems sending mail from the iPhone, try the following.
Settings > Mail, Contacts, Calendars
Under Accounts, click the account you are having trouble sending mail with.
Scroll down to Outgoing Mail Server and select it. Make smtp.att.yahoo.com the Primary mail server, if it isn’t already, and make sure it is set to “On”. Check that Use SSL is on, Authentication is On, and Server Port should be 465.
If you still have trouble, try turning off WiFi and try sending again. Sometimes I’ve found that that works better.