Hey folks, I’m pulling my hair out over here!
I’m trying to send emails using Nodemailer with Mailgun, but I keep hitting a wall. Every time I try, I get this frustrating error:
sendRawEmail Error: Invalid login: 535 Authentication failed
code: 'EAUTH',
response: '535 Authentication failed',
responseCode: 535,
command: 'AUTH PLAIN'
I’ve double-checked my SMTP settings, username, password, and port. They all look good to me. I’ve been googling for hours, but nothing seems to work for my specific situation with Mailgun.
Has anyone else run into this? Any ideas on what I might be missing? I’m starting to think it’s something silly, but I can’t figure it out for the life of me.
If you’ve dealt with Mailgun authentication issues before, I’d really appreciate any tips or tricks you can share. Thanks in advance for any help!
yo zack, i had similar probs with mailgun. check ur api key - sometimes they expire or get revoked. also, make sure ur using the right domain (sandbox vs custom). if all else fails, try generatin a new api key. hope this helps, man!
I encountered a similar issue with Mailgun authentication recently. Have you verified that your Mailgun account is fully activated? Sometimes, new accounts require additional verification steps before allowing SMTP access. Additionally, ensure you’re using the correct SMTP credentials, not the API key, for Nodemailer configuration. If you’re certain everything is set up correctly, try reaching out to Mailgun support. They were quite helpful in resolving my authentication problems and might be able to spot something we’re overlooking. Don’t give up - these authentication hiccups can be tricky but are usually solvable with a bit of persistence.
Hey Zack, I feel your pain! I’ve been in the same boat with Mailgun authentication. One thing that tripped me up was the region setting. Make sure you’re using the correct SMTP server for your account’s region (US or EU). Also, double-check that you’re not accidentally using your personal account credentials instead of the SMTP credentials Mailgun provides.
Another gotcha: if you’re using a sandbox domain, there are restrictions on recipient email addresses. You might need to add the recipient to your authorized recipients list in the Mailgun dashboard.
Lastly, try enabling verbose logging in Nodemailer. It helped me pinpoint the exact step where authentication was failing. Don’t lose hope – once you crack this, it’s smooth sailing!