2
$\begingroup$

I am trying to login to my Gmail account using the built-in function MailServerConnect[] and require help with the process:


  1. Connecting to the Gmail server (using MailServerConnect[])

I know Mathematica added MailServerConnect in version 12 but when I tried it as

MailServerConnect["mail.google.com", "username", "pass"]

, this message appears:

MailServerConnect::auth: Failed to connect to mail.google.com port 993: Connection refused

Question What is the reason for the appearance of this message? Any help/suggestions would be appreciated.

$\endgroup$
10
  • $\begingroup$ Try: smtp.gmail.com ? $\endgroup$
    – Syed
    Nov 16, 2021 at 6:07
  • $\begingroup$ it returns: Failed to connect to smtp.google.com port 993: Timed out $\endgroup$
    – Wisdom
    Nov 16, 2021 at 6:12
  • $\begingroup$ support.google.com/mail/answer/… $\endgroup$
    – Syed
    Nov 16, 2021 at 6:30
  • $\begingroup$ For incoming connections to gmail, use the server: imap.gmail.com. I tried and was denied access with an ominous red-themed message that someone has my password. Also you have to enable IMAP on gmail settings. $\endgroup$
    – Syed
    Nov 16, 2021 at 7:30
  • 2
    $\begingroup$ Glad it worked!! Please edit your post including title and make it about "logging in" only. Then start a fresh and a more focused question when you run into difficulty with next steps. Let this be the last comment on the page. $\endgroup$
    – Syed
    Nov 16, 2021 at 8:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.