I can't get email on my Mac if mail on iPhone is open!

I can't get email on my Mac if mail on iPhone is open!

If I have my mail program open on my phone, I can't get mail on my computer. It says "The mail server denied access to the account “••••••••••••” because an administrator or other mail client was using it when Mail tried to log in. Try again later." Is there a way to fix this?  I sometimes need both open.