module.exports = function(app) {
var email, mailto, name, nodemailer, pass, transporter;
nodemailer = require('nodemailer');
name = 'name';
email = 'mailer@gmail.com';
pass = 'pass';
transporter = nodemailer.createTransport({
service: 'Gmail',
auth: {
user: email,
pass: pass
}
});
mailto = function() {
var options;
options = {
from: name + " <" + email + ">",
to: email,
subject: 'title',
html: 'html'
};
return transporter.sendMail(options, function(err, info) {
if (err) {
console.log(err);
return err;
}
return console.log("Сообщение отправлено: " + info.response);
});
};
};