I get an authentication error when using Nodemailer with Mailgun. Nodemailer docs say the library works well with Mailgun SMTP, but I keep getting this error when I launch my application:
{ [AuthError: Invalid login - *** *.*.* Mailgun is not loving your login or password]
name: 'AuthError',
data: '*** *.*.* Mailgun is not loving your login or password',
stage: 'auth' }
Here's how I set up my transport:
@Transport = nodemailer.createTransport("SMTP",
service: "Mailgun"
auth:
user: "api"
pass: "**********************"
)
I am 100% sure that my api key is correct. Are there any other requirements that I am missing?
For what it's worth, it works great when I use a Gmail address.
source
share