Skip to content

Commit

Permalink
Added debugging for SMTP connection
Browse files Browse the repository at this point in the history
  • Loading branch information
speckij committed Mar 28, 2018
1 parent 94b889e commit e4ac12f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
- Added q14 (Custom Files)
- Added Password Generation on Cover Sheet
- bugfixes & style improvements

- Added Debugging for SMTP Connection

>>>>>>> Stashed changes
# Version 1.4.0
- Added Reminder Email to be sent out after 7 days of inactivity with still pending reviews.
- Added Revision Number on Output Documents
Expand Down
12 changes: 11 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pool.on('error', function (err, client) {


// SMTP CONFIGURATION
exports.transporter = nodemailer.createTransport({
var trans = nodemailer.createTransport({
host: process.env.SMTP_HOST,
port: process.env.SMTP_PORT,
secure: JSON.parse(process.env.SMTP_SSL),
Expand All @@ -57,6 +57,16 @@ exports.transporter = nodemailer.createTransport({
}
});

// verify connection configuration
trans.verify(function(error, success) {
if (error) {
console.log(error);
} else {
console.log('Connection to Email Server successfull!');
}
});

exports.transporter = trans;

// Load certificstes
if(process.env.NODE_ENV === "production") {
Expand Down

0 comments on commit e4ac12f

Please sign in to comment.