1
0
mirror of https://github.com/eleith/emailjs.git synced 2024-07-05 20:10:37 +00:00

support older versions of node with options that are not properly defaulted

This commit is contained in:
eleith 2016-09-13 22:49:24 -07:00
parent b6375bdf16
commit 09a3b8e899
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{
"name": "emailjs",
"description": "send text/html emails and attachments (files, streams and strings) from node.js to any smtp server",
"version": "1.0.7",
"version": "1.0.8",
"author": "eleith",
"contributors": [
"izuzak",

View File

@ -244,7 +244,8 @@ SMTP.prototype = {
// support new API
if (tls.TLSSocket) {
var secured_socket = new tls.TLSSocket(self.sock, {
secureContext: tls.createSecureContext ? tls.createSecureContext(self.tls) : crypto.createCredentials(self.tls)
secureContext: tls.createSecureContext ? tls.createSecureContext(self.tls) : crypto.createCredentials(self.tls),
isServer: false // older versions of node (0.12), do not default to false properly...
});
secured_socket.on('error', function(err) {