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