Some popular services or enterprise IMAP servers blocked mail sending to a different address. To solve this issue make sure, that the IMAP server allows sending emails for different sender addresses.
Gmail
Go to Settings -> Accounts -> Send mail as:
https://support.google.com/mail/answer/22370
Yahoo
Go to Settings -> Accounts