Message Boards Message Boards

Send email with SendMail or an external delivery service?

8 Replies
POSTED BY: Rodrigo Murta
Posted 9 years ago

If it is better, why wouldn't SendMail[] be modified to work like this?

POSTED BY: Sandu Ursu

Whether it's better to use SendMail or an email delivery service will depend on your application. Right now the delivery service is likely the only solution if you need to send thousands of emails per month, anticipate even higher future volumes, and want to send from your own domain to many different destination email addresses. I heartily agree with your suggestion to enhance SendMail. Indeed there could be quite an opportunity for a strategic alliance between Wolfram Research and an email delivery service provider: Wolfram would gain highly specialized expertise in delivering email against the ever evolving background of spammers and countermeasures. The delivery service provider might gain a lot of new users from Mathematica and Wolfram Cloud applications.

Christopher,
I have tested your mail solution and it works. Then I went on trying to add "inline" html image and "attachments". Both need to be formatted like inline="@files/filename.jpg" or attachments="@files/filename.jpg". The "inline" must be very easy. I suspect the "attachment" is probably a little more difficult because it needs multipart/form-data.

in urlfetch i found "MultipartElements" -> {{"partName", "mime/type", {1, 2, 3, 4, 5}}}

can you help me solve how to do this?

Yes, all mail services will handle HTML formatted email. For a simple Mailgun example see Manual > Sending Messages > Sending via API. The example cURL HTML string is added to the MultipartElements option of the Wolfram Language URLFetch. Preserve and enhance the reputation of your domain (and IP address) by sending both text and HTML or text only, see Email Best Practices > Email Content.

Christopher, thanks for sharing. If I am not mistaken this adds html formatted mail.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract