Skip to content

Commit

Permalink
#10 uncomment sending email
Browse files Browse the repository at this point in the history
  • Loading branch information
dangerdak committed Nov 28, 2017
1 parent 9be5d90 commit 1e3f70d
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/controllers/send.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const fs = require('fs');
const nodemailer = require('nodemailer');
const PDFDocument = require('pdfkit');
require('env2')('config.env');
Expand Down Expand Up @@ -53,16 +52,15 @@ exports.post = (req, res) => {
},
],
};
fs.writeFile(__dirname + '/test.pdf', pdfData);
//transporter.sendMail(message, (err, info) => {
//if (err) {
//console.log('transporter', err);
//} else {
//console.log(info);
//res.redirect('finish');
//}
//});
// end nodemailer
transporter.sendMail(message, (err, info) => {
if (err) {
console.log('transporter', err);
} else {
console.log(info);
res.redirect('finish');
}
});
end nodemailer
});
populatePdf(doc, data);
doc.end();
Expand Down

0 comments on commit 1e3f70d

Please sign in to comment.