To use email from the Wolfram Language, you need to specify your email servers and credentials.

① Configure settings for incoming mail

Choose and select Internet & Mail / Mail Settings / Incoming. Enter settings for incoming mail in the input fields:

Programmatically...

Use the MailSettings option to configure the default parameters for incoming mail:

In[1]:=
Click for copyable input
Out[1]=

② Configure settings for outgoing mail

Using the menu...

Choose and select Internet & Mail / Mail Settings / Outgoing. Enter settings for outgoing mail in the input fields:

  • Outgoing mail settings are used by SendMail.

Programmatically...

Use the MailSettings option to configure the default parameters for outgoing mail:

In[2]:=
Click for copyable input
Out[2]=

If this is the first time these login credentials are being used, a dialog box will appear after the code is evaluated. Enter your username and password, then click OK:

Out[2]=

Notes

In the Wolfram Cloud, emails are always relayed from the Wolfram Cloud server.
SendMail will attempt to send email via the Wolfram Cloud if email settings and credentials have not been provided.
For help with adjustment of settings like encryption protocol and identification of port number, contact your email service provider.