I was getting this error when trying to send an email on my iPhone:
Online, some people say Yahoo doesn't recognise the server apple.smtp.mail.yahoo.com, and to manually set up an account using smtp.mail.yahoo.com instead. I tried that, but it couldn't send either.
The original message had 5 attachments. I tried sending a test message and it went through. I tried a few combinations and it seems to fail because the message is too large, not because of the server. Looks like Yahoo limits mail size from iOS (the web version accepts 25 MB of attachments).
The manual mail account seems to work the same, so I'm too lazy to change it back.