Duplicate emails
-
When using the service of sending emails of a pdf, it comes to me with a duplicate, that is, it is sent twice, and when making a different configuration, now it comes to me three times, it must be some configuration that is stored ... something like that...
function afterRender(req, res, done) { var mailer = require("nodemailer"); var smtpTransport = mailer.createTransport('smtps://jairo@midominio.co:password@smtp.midominio.com'); var mail = { from: "Mi persona <miusuario@midominio.co>", to: "miusuario@gmail.com", subject: "Test from jsreport", text: "Esto es un test", html: "<b>Esto es un test, parte 2. Veamos si me voy mas de una vez</b>", attachments: [ { filename: 'Reporte - {{ client.name }}.pdf', content: new Buffer(res.content) }], } smtpTransport.sendMail(mail, function(error, response){ smtpTransport.close(); if(error){ return done(error); } return done(); });
}
-
I removed the Spanish from your post. Please don't use it on forum. I already mentioned it in your previous post. :)
-
Maybe this documentation part helps
https://jsreport.net/learn/scripts#child-templates-and-headers
-
thank you very much, I work perfect.