sendgrid / nodemailer-sendgrid-transport

SendGrid transport for Nodemailer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

From field doesn't work properly when get address object

mazzy89 opened this issue · comments

I get the error

[Error: Empty from email address (required)]

when I try to send a message in this way.

transporter.sendMail({
    from: {
      name: email.name,
      address: email.from
    },
    to: 'myaddress@email.it',
    subject: 'Info',
    text: email.message
  }, function(error, info) {
    if (error) {
      console.log(error);
    }
    reply(info);
  });

This error should tell me that the from object hasn't been provided but it is not possible because the string email.name and email.from are filled with the correct informations. I'm totally sure it depends from sendgrid transport

This was fixed in the latest release (0.1.0) thanks to @andris9.