You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
459 B
16 lines
459 B
7 years ago
|
const Promise = require('bluebird');
|
||
|
const sendmail = Promise.promisify(require('sendmail')());
|
||
|
|
||
|
async function send_sendmail(to, subject, body) {
|
||
|
await sendmail({
|
||
|
from: `${syzoj.config.title} <${syzoj.config.register_mail.address}>`,
|
||
|
to: to,
|
||
|
type: 'text/html',
|
||
|
subject: subject,
|
||
|
html: body
|
||
|
});
|
||
|
}
|
||
|
|
||
|
module.exports.send = async function sendEmail(to, subject, body) {
|
||
|
await send_sendmail(to, subject, body);
|
||
|
}
|