Commit 6f7ceff7 authored by Vytor Calixto's avatar Vytor Calixto 👾

Merge branch 'feature_send_email' into 'master'

Make it work

See merge request !3
parents cbbda3e9 7cc057c4
Pipeline #11828 failed with stage
in 1 minute and 20 seconds
......@@ -9,11 +9,12 @@ let transporter = nodemailer.createTransport({
let mailOptions = {
"from": "\"Laboratório de Dados Educacionais\" <lde@c3sl.ufpr.br>",
"to": "<dadoseducacionais@ufpr.br>"
"to": "<dadoseducacionais@ufpr.br>",
"subject": "Você recebeu uma mensagem no LDE"
};
module.exports = function send(content, callback) {
mailOptions.content = content;
mailOptions.text = content;
transporter.sendMail(mailOptions, (err, info) => {
if (err)
return callback(err);
......
......@@ -58,7 +58,7 @@ messageApp.post('/', (req, res, next) => {
},
contents: req.body.contents
});
text = message.author.name + " <" + message.author.email +
let text = message.author.name + " <" + message.author.email +
"> enviou a seguinte mensagem via página de contato do LDE: \"" +
message.contents + "\"";
Email(text, (err)=> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment