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.
you cannot use api key with smtp transport.
Go to mailgun console and grab smtp credentials from domain config and use those.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With