Group Abstract Group Abstract

Message Boards Message Boards

SendMail from Mathematica 9 on MacOS 10.9

GROUPS:
Could someone post an example of a SendMail command that works on MacOS 10.9 (Mavericks) with Mathematica 9?
POSTED BY: Christopher Purcell
Answer
1 year ago
We will mention a few resources and after you try them you could perhaps give details on what exactly did not work out for you.
POSTED BY: Moderation Team
Answer
1 year ago
Thank you but I had seen these already and a number of other references on this topic, but none were helpful. The original post was intentionally as concise as I could make it but if you are hungry for more:
As your 3rd reference suggested I abandoned using the Apple iCloud mail server from SendMail and tried gmail instead, but with no improvement, using something like this:
 SendMail[
  "To" -> "someone@mac.com", 
  "Subject" -> "Example Message",
  "Body" -> "My text", 
  "From" -> "someone@gmail.com",
  "Server" -> "smtp.gmail.com", 
  "UserName" -> "someone@gmail.com",
  "Password" -> Automatic,
  "PortNumber" -> 587, 
"ServerAuthentication" -> Automatic, 
"EncryptionProtocol" -> "StartTLS"]

Mathematica returns $Failed and the message: "SendMail::msgerr: Mathematica received an unexpected response during message transport."

I don't see anything in the system logs that indicate trouble. An undocumented "verbose" option accepted by SendMail would be nice about now. Needless to say Mathematica is able to pass the internet connectivity test to the Wolfram servers, and this computer is fully functional in regard to mail by standard means. 
POSTED BY: Christopher Purcell
Answer
1 year ago
The following has worked for me with Gmail, M 9.0.1, OSX 10.9

SendMail["To" -> "somebody@domain.edu", "Subject" -> "Example Message",
"Body" -> "My text", "From" -> "somebody@gmail.com",
"Server" -> "smtp.gmail.com", "UserName" -> "somebody",
"Password" -> Automatic, "PortNumber" -> 587,
"EncryptionProtocol" -> "StartTLS"]

It looks nearly identical to your version of the command.
POSTED BY: Szabolcs Horvat
Answer
1 year ago
Thanks for sharing that. Now the mystery deepens, since as you say, your SendMail command version is essentially identical to mine, and it appears we have the same Mathematica and MAC OS versions. In fact if I use your template exactly (filling in the placeholders) the result is unchanged ($Failed and same message as above). Firewall settings have no effect. 
POSTED BY: Christopher Purcell
Answer
1 year ago
Christopher, this looks like a specific to your set up problem and we recommend contacting Technical Support Team. Also we a happy to let you know that we have a tutorial on posting published which can explain you how to post more easily, including placing code in designated code blocks so the code will not get corrupted by rich-text formatting applied to regular text in the post. You probably have already seen many people are using those code blocks. How to type up a post: editor tutorial & general tips
POSTED BY: Moderation Team
Answer
1 year ago
SendMail["To" -> "ausername@me.com", "Subject" -> "Ooo am I not clever",
"Body" -> "sending email from Mathematica",
"From" -> "anotherusername@mykolab.com", "Server" -> "smtp.mykolab.com",
"UserName" -> "anotherusername@mykolab.com", "Password" -> Automatic,
"PortNumber" -> 587, "EncryptionProtocol" -> "StartTLS"]
POSTED BY: peter lindsay
Answer
1 year ago
SendMail["To" -> "ausername@me.com", "Subject" -> "Ooo am I not clever", 
"Body" -> "sending email from Mathematica",
"From" -> "anotherusername@mykolab.com", "Server" -> "smtp.mykolab.com",
"UserName" -> "anotherusername@mykolab.com", "Password" -> Automatic,
"PortNumber" -> 587, "EncryptionProtocol" -> "StartTLS"]

This still seems to work. Now on M10, OS X 10.9.4

POSTED BY: peter lindsay
Answer
2 months ago

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.: enter image description here

This is necessary to allow Mathematica to send emails from Gmail.

Steve

POSTED BY: Stephen Wilkus
Answer
6 days ago