andris9/Nodemailer — pull request #54 by taxilian (2011-12-13 23:37:29+00:00)
Title: Allow disabling of TLS

My company uses authsmtp.com's smtp service; they allow TLS/SSL, but you have to enable it for your account and if you do it slows things down and each email costs as though you sent 2. For those reasons, we didn't want to use TLS.

This patch makes it so you can pass tls: false in your nodemailer.SMTP config object and it will not call STARTTLS.

There may be a better way to do this; I'm not sure. I also considered making tls: true force TLS to be used with any other value (null, undefined, "frank", etc) meaning use the default, but I dont' know the codebase well enough to do that easily. If you want to make something more elegant I'll switch to using your solution, but it'd be nice to have a solution in the main codebase so I don't have to maintain my own fork =]