I've tried without success to get
MailServerConnect to work, in the first instance, with Gmail.
Method 1: In Mathematica's Preferences > Internet and Mail > Incoming, i specified mail.gmail.com as Server, my username on Gmail as Username, entered my paswword there, and saved. Yet
gives error "Could not resolve host: mail.gmail.com".
Method 3: Evaluating
MailServerConnect[MailSettings -> <|"IncomingMailServer" -> <|"Host" -> "mail.gmail.com", "Username" -> "myusernamehere"|>|>]
followed by entering my Gmail password at the pop-up prompt, gives the same error.