Found a solution for this that works for me. Just delete the account in Mail and re-create. My imap gmail is working fine now.
Ok, I think I may have figured something out here....
I use IMAP as stated earlier.
I started from scratch with my gmail accounts in mail 4.0.
I hit Mailbox > Take all accounts offline.
Then created my 2 gmail accounts, following gmail's support page I unchecked all the options on the Mailbox Behaviors tab.
I used myemail@gmail.com for the username, not just the first part of my email, i.e. myemail@gmail.com. This is also suggested in the gmail help guide, but mail doesn't set it up this way.
I forced my SMTP port to 587 in mail's setting instead of just having it use "standard ports 25, 465, 587"
I created both accounts, set those options, and hit take all mailboxes online. Mail seems to be downloading my messages from gmail smoothly so far for both accounts at the same time.
After a couple hours struggling with mail and gmail, i found a solution: In advanced options > change the smtp port to 995 (it was 993) and bingo!
I don't know why, since it's no change to the incoming server, but after that i immediately could recieve mail.
This is an issue that has been discussed and explained to death. It is a common practice for ISPs to block SMTP access to foreign [out of domain] SMTP servers. This is a security measure. The default SMTP port is usually Port 25 for unauthenticated SMTP access. It is a favorite of spammers. ISPs respond by restricting Port 25 to their own servers. The remedy is to use authenticated SMTP access. This is done on Port 587. Changing your SMTP port for Gmail to Port 587 works. You must also give your Gmail credentials.I have tried to solve this problem and every single solution is only temporary. It seems to work when you try something, then a few weeks or months later it comes back. Here is what my screen looks like when I get this error. Something unusual though, it only happens for certain emails, I can receive mail just fine, but when sending to certain people I get errors.![]()