Sending email over SMTP with STARTTLS (sending email via gmail)

Bob Sneidar bobsneidar at iotecdigital.com
Wed Apr 27 11:06:25 EDT 2016


This comes up from time to time. I've attempted this with no success. SSL and TLS are fairly involved, and would require some kind of plug-in to be written which was capable of interacting with the security elements of modern OSes. I tried shelling this out, but the Windows CMD shell, specifically the telnet client, has no access to TLS libraries so far as I know. 

There is a neat little utility called SMTPConsole for Windows where the author has built an app which is nothing more than a TELNET shell with SSL/TLS libraries built in. I use it to test SMTP connections in the field. It may be possible to contact that person and see if you can get access to/purchase his libraries and incorporate them into an SSL/TLS library for LC. 

The best workaround for this is to use a local open relay running on a windows server (windows clients do not have this feature built in but there are 3rd party offerings which can do this). The relay is then responsible for encrypting the traffic. The bugaboo about this method is that anyone sniffing the local traffic can see everything being transmitted, so this is not a good solution for a HIIPA site, for example. 

Bob S


> On Apr 15, 2016, at 04:17 , Ben Rubinstein <benr_mc at cogapp.com> wrote:
> 
> I have a venerable app which does some automated work on a schedule, and emails a report.
> 
> The app uses Shao Sean's libSmtp, dating back to 2005. It's typically set up using an organisation's internal SMTP server to send email.
> 
> Now my client has switched to using Google Apps for business, and asked me to switch the app to using a gmail account they've set up for the purpose to send emails.  Entering the credentials they provided fails with a nessage inb the log "530 5.7.0 Must issue a STARTTLS command first".
> 
> Evidently this is all part of the shift to encrypting all communications (so it's the FBI's fault!).  I don't think libSMTP handles this bit of the protocol - and I don't know whether it even can be done through LiveCode, since my understanding is that this requires SSL/TLS support.
> 
> Is it possible to send email over SMTP with TLS using LiveCode?
> 
> Has anyone managed to send emails by SMTP to gmail server?
> 
> Many thanks,
> 
> Ben
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list