3d-interface/posts/coin-info/index.js

20 lines
549 B
JavaScript
Raw Normal View History

2015-07-17 14:53:45 +02:00
var mail = require('../../lib/mail.js');
var Log = require('../../lib/NodeLog.js');
module.exports.index = function(req, res) {
mail.send({
2015-07-23 11:48:19 +02:00
from: req.body.name + " <" + req.body.name + "@toto.tata>",
2015-07-17 14:53:45 +02:00
to: "Thomas <thomas.forgione@gmail.com>",
2015-07-23 11:48:19 +02:00
subject: req.body.scene + " by " + req.body.name,
2015-07-17 14:53:45 +02:00
text: JSON.stringify(req.body.coins)
}, function(err, message) {
if (err !== null) {
Log.mailerror(err);
}
});
res.setHeader('Content-Type', 'text/html');
res.send("");
};