|
|
|
|
85
|
// - parameters for sending the mail(s)
|
85
|
// - parameters for sending the mail(s)
|
86
|
let params = {
|
86
|
let params = {
|
87
|
subject: req.body.subj,
|
87
|
subject: req.body.subj,
|
88
|
- from: req.body.name + '<' + settings.mailserver.user + '>',
|
|
|
|
|
88
|
+ from: req.body.name + '<' + settings.mailserver.auth.user + '>',
|
89
|
replyTo: req.body.name + ' <' + req.body.addr + '>',
|
89
|
replyTo: req.body.name + ' <' + req.body.addr + '>',
|
90
|
html: req.body.text
|
90
|
html: req.body.text
|
91
|
};
|
91
|
};
|
|
|
|
|
95
|
// text entered by the user
|
95
|
// text entered by the user
|
96
|
params.html = pug.renderFile('template.pug', params);
|
96
|
params.html = pug.renderFile('template.pug', params);
|
97
|
|
97
|
|
98
|
- log.info('Sending message from ' + params.from);
|
|
|
|
|
98
|
+ log.info('Sending message from ' + params.replyTo);
|
99
|
|
99
|
|
100
|
// Send the email to all users
|
100
|
// Send the email to all users
|
101
|
sendMails(params, function(err, infos) {
|
101
|
sendMails(params, function(err, infos) {
|