Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


sends mail consisting of body to the address specified by $WolframID.

sends mail with the specified subject and no body.

sends mail with the specified subject and body.

sends mail with the attachment or attachments att.

sends mail to the specified To: address.

sends mail to multiple To: addresses.

includes the cci as Cc: addresses.

also includes the bcci as Bcc: addresses.

uses the options opts.

sends mail with elements specified in the association assoc.

Details and OptionsDetails and Options

  • Email addresses are given as strings.
  • The message body can be a string, an expression, or a list of expressions.
  • SendMail automatically embeds graphics and typeset expressions as raster image files. It embeds sounds as audio files. It also embeds symbolic XML as XML files.
  • SendMail uses appropriate encodings to handle any special characters that appear in a message.
  • On desktop systems, SendMail requires certain user mail settings. These can be defined through Preferences Internet Connectivity Mail Settings in the notebook front end or by using SetOptions[SendMail,]. SendMail will attempt to send email via the Wolfram Cloud if these settings have not been provided. »
  • Mail settings are stored so as to be consistent across sessions.
  • Mail settings can also be given explicitly as options in SendMail.
  • In the Wolfram Cloud, default mail settings are automatically set up from user account information.
  • The following elements can be used to specify mail to send:
  • "To"{}email addresses of primary recipients
    "Cc"{}email addresses of secondary recipients
    "Bcc"{}email addresses of hidden recipients
    "Subject"Nonemessage subject line
    "Body"Nonemessage body
    "AttachedExpressions"{}expressions to send as attachments
    "AttachedFiles"{}files to send as attachments
  • These elements can appear either in options or in associations in SendMail[assoc] or SendMail[recipients,content].
  • "AttachedFiles" works with File and URL objects.
  • The following elements specify required settings:
  • "From"sender's email address
    "Server"server host name or IP address
  • Additional settings include:
  • "EncryptionProtocol"Noneemail encryption protocol
    "FullName"Nonesender's full name
    "Password"Automaticuser password
    "PortNumber"Automaticserver port number or numbers
    "ReplyTo"Nonesuggested address for replies
    "ServerAuthentication"Automaticwhether and how to verify server certificates
    "UserName"$UserNameuser login name
  • Possible settings for "EncryptionProtocol" include "SSL", "StartTLS", "TLS", and None.
  • "Password" is typically set to None if no password authentication is required, or to Automatic if the password is to be entered in an interactive dialog. The password can also be given as a plain text string.
  • Email credentials can be optionally stored via the "Password" interactive dialog. The credentials are encrypted using keys stored on your computer's hard drive. The encrypted credentials will be transmitted to the Wolfram Cloud and may only be accessed after you have authenticated using your Wolfram ID.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Send email with the specified body to $WolframID:

Click for copyable input

Send email with the specified subject to $WolframID:

Click for copyable input

Send email to the specified recipient:

Click for copyable input

Specify recipients and content in options:

Click for copyable input
Introduced in 2008
| Updated in 2014