projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix email formatting (I think)
[vchess.git]
/
server
/
utils
/
mailer.js
diff --git
a/server/utils/mailer.js
b/server/utils/mailer.js
index
9a42a17
..
60cc9f2
100644
(file)
--- a/
server/utils/mailer.js
+++ b/
server/utils/mailer.js
@@
-8,10
+8,13
@@
module.exports = function(from, to, subject, body, cb)
{
console.log("New mail: from " + from + " / to " + to);
console.log("Subject: " + subject);
{
console.log("New mail: from " + from + " / to " + to);
console.log("Subject: " + subject);
- let msgText = body.split('\\n');
- msgText.forEach(msg => { console.log(msg); });
+ console.log(body);
+ if (!cb)
+ cb = (err) => { if (!!err) console.log(err); }
return cb();
}
return cb();
}
+ else if (!cb)
+ cb = () => {}; //default: do nothing (TODO: log somewhere)
// Create reusable transporter object using the default SMTP transport
const transporter = nodemailer.createTransport({
// Create reusable transporter object using the default SMTP transport
const transporter = nodemailer.createTransport({