When connecting to e-mail,I get not connected to server,how do you fix this?

I am connected to wi-fi and everything else is working,I just don't understand why the e-mail isn't. I'm not very good with computer problems,so I hope there is a simple solution.
If you have changed your e-mail password (e.g., MSN, Gmail), make sure you have the correct password assigned to your account(s) in Preferences.

Also, make sure under Mailbox you have Take All Accounts Online selected.

Original thread: https://forums.imore.com/threads/when-connecting-to-e-mail-i-get-not-connected-to-server-how-do-you-fix-this.324305/