the problem that I have is that I'm using https://github.com/sendgrid/sendgrid-nodejs to send email through the API and everytime I use the sent_at function, my email has the type : "Drop" in my Sendgrid Dashboard and the reason is : "invalid SMTPAPI header". I really can't find why... Here's my code :
var email = new sendgrid.Email({
to: "[email protected]",
from: "[email protected]",
subject: "TEST"
});
var now = moment();
now.add(4, 'days');
email.setSendAt(now.unix());
sendgrid.send(email, function(err, json) {
if (err) { return callback(err); }
console.log("json email promo response ->", json);
return res.status(200).end();
});
I'm trying to schedule my email to be sent 4 days later. When I execute this, I receive the "json email promo response -> success". So everthing seems to work well. But when I go in my dashboard with Sendgrid, it doesn't process my email.
Thank you very much! Thierry