I have the following mathematica code to send me an email once a calculation is done. The code to calculate is saved in the 'code' variable.
SendMail["To" -> "jondoe@gmail.com",
"Subject" -> "Calculation Done",
"Body" ->
Evaluate[
ToExpression[code]],
"From" -> "jondoe@gmail.com",
"Server" -> "smtp.gmail.com",
"UserName" -> "jondoe@gmail.com",
"Password" -> Automatic, "PortNumber" -> 587,
"EncryptionProtocol" -> "StartTLS"]
When I run this code it sends the email fine, except instead of the message body being the result of the code, there is a gif image of the result as an attachment. I can add ToString before the Evaluate to solve this, except this makes me not able to send images or graphics.
How can I have SendMail send strings as the message body and images as attachments?
code? Do you need a result fromcodeto be automatically split to strings and images and images to be put in attachments? I'm asking because I'm not sure. – Kuba Jun 13 '16 at 07:32