This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)


sends an email message built up from the elements specified in rules.
  • The following elements define the content of a message:
"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
"Attachments"{}attachments, given as a list of filenames
  • 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.
  • SendMail requires certain user mail settings. These can be given explicitly as rules, or specified in Preferences settings in the notebook front end.
  • The following information is always required:
"From"sender's email address
"Server"server host name or IP address
  • Additional information that can be provided, and may be required on some systems, includes:
"EncryptionProtocol"Noneemail encryption protocol
"FullName"Nonesender's full name
"Password"Noneuser 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 include , , , None.
  • 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 plaintext string.
  • SendMail returns a unique message identification string.
Send email from within Mathematica:
Send email from within Mathematica:
Click for copyable input
New in 7