Better mail (easier to treat automatically)
This commit is contained in:
parent
cc4755cf9d
commit
1daf627232
|
@ -6,12 +6,7 @@ var Log = require('../../lib/NodeLog.js');
|
||||||
|
|
||||||
module.exports.index = function(req, res) {
|
module.exports.index = function(req, res) {
|
||||||
|
|
||||||
var text = '';
|
var text = 'id : ' + req.session.userId + '\n';
|
||||||
|
|
||||||
for (var i in req.body) {
|
|
||||||
text += i + ' : ' + req.body[i] + '\n';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
pg.connect(pgc.url, function(err, client, release) {
|
pg.connect(pgc.url, function(err, client, release) {
|
||||||
|
|
||||||
|
@ -20,6 +15,13 @@ module.exports.index = function(req, res) {
|
||||||
[req.session.userId],
|
[req.session.userId],
|
||||||
|
|
||||||
function(err, result) {
|
function(err, result) {
|
||||||
|
|
||||||
|
text += 'workerId : ' + result.rows[0].name + '\n';
|
||||||
|
|
||||||
|
for (var i in req.body) {
|
||||||
|
text += i + ' : ' + req.body[i] + '\n';
|
||||||
|
}
|
||||||
|
|
||||||
mail.send({
|
mail.send({
|
||||||
from: result.rows[0].name + " <" + req.session.userId + "@toto.tata>",
|
from: result.rows[0].name + " <" + req.session.userId + "@toto.tata>",
|
||||||
to: "Thomas <dragonrock.django@gmail.com>",
|
to: "Thomas <dragonrock.django@gmail.com>",
|
||||||
|
|
Loading…
Reference in New Issue