mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-04-12 12:05:57 -05:00
23 lines
408 B
JavaScript
23 lines
408 B
JavaScript
const nodemailer = require('nodemailer');
|
|
const config = require('../config.json');
|
|
|
|
const transporter = nodemailer.createTransport({
|
|
host: 'smtp.gmail.com',
|
|
port: 587,
|
|
secure: false,
|
|
auth: {
|
|
user: config.gmail.user,
|
|
pass: config.gmail.pass
|
|
}
|
|
});
|
|
|
|
async function sendMail(options) {
|
|
options.from = config.gmail.from;
|
|
|
|
return await transporter.sendMail(options);
|
|
}
|
|
|
|
module.exports = {
|
|
sendMail
|
|
};
|