SendMail

SendMail[rules]
sends an email message built up from the elements specified in rules.

Details and OptionsDetails and Options

  • 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.
New in 7
New to Mathematica? Find your learning path »
Have a question? Ask support »