Normally, to send mail by Mathematica, I use something like this:
sendMail[subject_,body_]:=
SendMail[
"To"->"someEmailAddress",
"Subject"->subject,
"Body"->body,
"From"->"[email protected]",
"Server"->"smtp.gmail.com",
"PortNumber"->587,
"EncryptionProtocol"->"StartTLS",
"UserName"->"myUserName",
"Password"->"myPassword"
]
So I can call it like:
sendMail["my subject","my body"]
It used to work so far so good, but now I started to receive this error message:
"SendMail::authfail: Login credentials were denied by the server "smtp.gmail.com"." And received this mail from Google.
If I just try do give permission to "less secure app", I get this message:
How can I use SendMail
with this new security rule?
I'll send a mail to Wolfram support too. If I get something I post here.
SendMail
in v11. I agree, follow @SjoerdC.deVries link to make an application specific password that you include in yourSendMail
orSetOptions
per the Wolfram page under Scope/Account Configuration ... I also needed to the electStartTLS
as the encryption protocol and used the port listed for StartTLS on this gmail help page. I also (kept) IMAP 'on ' under gmail Settings / Forwarding and POP/IMAP. $\endgroup$