Apple Mail stops working for IMAP, SMTP or both.
If at some point, your Mac Mail stops working for IMAP, SMTP or both,
and you are getting an error similar to:
"SMTP: Client host rejected"
Try this:
- Quit Mail, disconnect from the Ethernet (unplug or turn off WIFI), reboot, connect to the Ethernet, set up mail server.
and/or - Make sure the mail account name is 8 characters or less and the SMTP server account name (not the Host name) is 8 characters or less.
Source