Modern email library

Matthias Rebbe matthias_livecode_150811 at m-r-d.de
Wed Nov 30 18:29:35 CET 2016


It always depends on how you use such libraries or externals.

The new tsNET external allows us for example to send notification emails from our scheduled unattended maintenance tools using our own in-house mailserver. Our mailserver requests authentication from our apps  before sending out to external addresses. 
This works really smooth. What other possibilities would we have? We could create a web service to which we would post the notifications and then let the web service send out the emails for us using the web servers smtp. We did so in the past.
But tsNet is much better.

Matthias


> Am 30.11.2016 um 17:42 schrieb Richard Gaskin <ambassador at fourthworld.com>:d
> 
> Personally, I've never been comfortable relying on client-side SMTP.  I figure that any device configured to allow any app to send arbitrary emails without explicit user intervention will eventually become a spambot, so my hope is that it's only a matter of time before the OS provider puts an end to that.
> 
> For most systems I prefer to use the "mailto:" protocol to open a message in the user's own email client, so they can review it and decide whether they actually want to send it.
> 
> I do have some monitoring systems that provide notification, but I don't usually install email on a server designed for any other purpose.
> 
> So instead I maintain one server on one of my shared hosting accounts as a notification center (it's not used often enough to warrant a VPS, but if you expect heavy load VPSes are cheap these days).  It runs an LC CGI that accepts a compressed encoded array containing the email elements (to, from, subject, body, etc.), and it formats it for use by sendmail, which it then calls from the command line.
> 
> The advantages with using an external server to do the actual sending are:
> 
> - I'm not dependent on a local SMTP client implementation, which I
>  hope for security's sake won't always be available.
> 
> - It uses a simple one-line call to a server, so it's easy to
>  add email support in any client app wherever I need it.
> 
> - The CGI is relatively simple to set up (Lesson examples available
>  for using sendmail with LC CGI).
> 
> - The server is reasonably protected (nothing is *absolutely*
>  protectable) by virtue of only accepting the LC-specific LSON
>  (encoded array) format, which is also encrypted before sending,
>  and transmitted over HTTPS.
> 
> By no means perfect (nothing is a magic pony), but easy to set up, convenient to use, and at least as secure as most alternatives.
> 
> I don't currently send attachments, but the MIME format is well documented and LC provides the raw materials needed (good text handling and base64 encoding), so even if a current library isn't readily available it shouldn't take long to package up an attachment with the body.




More information about the use-livecode mailing list