Earlier this year, 2014, I used SendMail repeatedly for a time consuming program that would send me updates by SMS messaging my phone. I had difficulty sending them from several of my email accounts but by following the examples above, I used gmail with excellent results, viz.:
SendMail["To" -> "7325333286@txt.att.net",
"Subject" -> "data processed.",
"Body" -> "Files are written.",
"From" -> "yourusername@gmail.com",
"Server" -> "smtp.gmail.com",
"UserName" -> "yourusername@gmail.com",
"Password" -> Automatic,
"PortNumber" -> 587,
"EncryptionProtocol" -> "StartTLS"]
Unfortunately, I just tried it again tonight (Oct. 26th, 2014) and found that gmail doesn't appear to work with this construct any more. I received an email from gmail stating:
We recently blocked a sign-in attempt to your Google Account [myusername@gmail.com].
Sign in attempt details
Date & Time: Sunday, October 26, 2014 2:08:06 AM UTC
Location: New Jersey, USA
If this wasn't you
Please review your Account Activity page at https://security.google.com/settings/security/activity to see if anything looks suspicious. Whoever tried to sign in to your account knows your password; we recommend that you change it right away.
If this was you
You can switch to an app made by Google such as Gmail to access your account (recommended) or change your settings at https://www.google.com/settings/security/lesssecureapps so that your account is no longer protected by modern security standards.
To learn more, see https://support.google.com/accounts/answer/6010255.
Sincerely,
The Google Accounts team
Following this link (the the correct account) allows one to permit access to Google Mail from "Less Secure Apps."
viz.:
This is necessary to allow Mathematica to send emails from Gmail.
Steve