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.

What's wrong?

  • 2
    $\begingroup$ For Gmail the host is imap.gmail.com. $\endgroup$ – Rohit Namjoshi Jan 10 at 21:06
  • $\begingroup$ @RohitNamjoshi: Are you sure about that? Because if I use it, I get a different error message now from MailServerConnect: Login denied. (When specifying my Mail Settings in Mathematica's Preferences, do I include the @gmail.com as part of my username? (I've tried it both with and without, and still same error from MailServerConnect.) $\endgroup$ – murray Jan 11 at 16:13
  • 1
    $\begingroup$ Hi @murray, I ran into the same issue, and the only workaround I could find was to change the security settings on my GMail account. The reason / instructions are described here. It would be nice if WL used the 'stronger security measures' referred to in that link. For username, I include the @gmail.com part. $\endgroup$ – Rohit Namjoshi Jan 12 at 0:09
  • $\begingroup$ @RohitNamjoshi: Thanks for that tip! $\endgroup$ – murray Jan 12 at 1:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.