Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 =]