Search code examples
node.jssendgridnodemailer

Nodemailer error: [Error: No transport method defined]


I am using nodemailer with sendgrid and i am getting the error : [Error: No transport method defined]

I am setting up the transport like so:

var email = nodemailer.createTransport("STMP", {
service: "Sendgrid",
auth: {
    user: "username",
    pass: "pass"
}
})

Solution

  • it says "STMP" rather than "SMTP" - simple typo