projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Roughly completed Users logic; untested
[vchess.git]
/
utils
/
mailer.js
diff --git
a/utils/mailer.js.dist
b/utils/mailer.js
similarity index 76%
rename from
utils/mailer.js.dist
rename to
utils/mailer.js
index
06cdc59
..
c8080b9
100644
(file)
--- a/
utils/mailer.js.dist
+++ b/
utils/mailer.js
@@
-1,17
+1,16
@@
const nodemailer = require('nodemailer');
const nodemailer = require('nodemailer');
+const params = require("../config/parameters");
-const contact = "your_contact_email";
-
-const send = function(from, to, subject, body, cb)
+module.exports = function(from, to, subject, body, cb)
{
// 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({
- host:
"smtp_host_address"
,
- port:
465, //if secure; otherwise use 587
- secure:
tru
e,
+ host:
params.mail.host
,
+ port:
params.mail.port,
+ secure:
params.mail.secur
e,
auth: {
auth: {
- user:
"user_name"
,
- pass:
"user_password"
+ user:
params.mail.user
,
+ pass:
params.mail.pass
}
});
}
});
@@
-42,9
+41,4
@@
const send = function(from, to, subject, body, cb)
//console.log('Message sent: %s', info.messageId);
return cb();
});
//console.log('Message sent: %s', info.messageId);
return cb();
});
-};
-
-module.exports = {
- contact: contact,
- send: send
-};
+}