Skip to content

Commit 0094338

Browse files
update smtp transport
1 parent dc78b1d commit 0094338

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

api/mail/email-verification.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,18 @@ module.exports = function(mongoose) {
111111
options[key] = optionsToConfigure[key];
112112
}
113113
}
114+
console.log(options.transportOptions);
114115
transporter = nodemailer.createTransport(options.transportOptions);
115116

117+
// verify connection configuration
118+
transporter.verify(function(error, success) {
119+
if (error) {
120+
console.log(error);
121+
} else {
122+
console.log('Email Server is ready to take our messages');
123+
}
124+
});
125+
116126
var err;
117127

118128
if (typeof options.verificationURL !== 'string') {

config/env/production.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,15 @@ module.exports = {
3636
3737
host: 'smtp.sendgrid.net',
3838
port: 465,
39-
secure: true,
39+
secure: false,
4040
service: 'Sendgrid',
4141
auth: {
4242
user: 'apikey',
4343
pass: process.env.SENDGRID_API_KEY
44+
},
45+
tls: {
46+
ciphers: 'SSLv3',
47+
rejectUnauthorized: false
4448
}
4549
}
4650
};

0 commit comments

Comments
 (0)