aws lambda - AWS SES/SNS notification no original headers -


i'm running notification node express backend service via aws lambda send emails via ses , catch bounces , complaints blacklist them on conditions. i'm using nodemailers mailcomposer module compose raw email.

here code send emails

var aws          = require("aws-sdk"); var mailcomposer = require('nodemailer/lib/mail-composer');  var ses = new aws.ses({ ... }  let mailoptions = {   : "sender name <user@domain.com>",   : ["bounce@simulator.amazonses.com"],   replyto : 'demo@demo.com',   inreplyto : '12345-message-id', // message-id message replying   subject : "subject of email",   text : buffer.from("plaint text version of email", 'utf-8'),    html : buffer.from("<div><p>hello customer</p></div>", 'utf-8'),    // , custom header   headers : {"customheader" : "13371337"},   }; let mail = new mailcomposer(mailoptions); mail.compile().build((err, maildata) => {    if(err){     console.log("error occured compiling");     console.log(err);     return;   }    var params = {     rawmessage : {       data : maildata     },   };    ses.sendrawemail(params, (err, data) => {     if(err){       console.log("error occured sending email");       console.log(err);     }else{       console.log("success");       console.log(data);     }   }); }); 

i have enabled "include original headers" in domains ses notification settings, email send successfully, notification backend service not receive customheader anywhere ...


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -