When I invite a Staff, I’m getting error message: Error sending email! Error sending email: Failed to send email. Reason: Invalid login: 535 5.7.139 Authentication unsuccessful, the user credentials were incorrect. [MW4PR04CA0084.namprd04.prod.outlook.com 2023-03-20T15:10:09.763Z 08DB2840C71EDC7D]. Please check your email settings and resend the invitation.
So it seems I’m able to successfully send using swaks…but I’m still not able to send from ghost. I’ve restarted the servers just in case, but I’m still getting an invalid login/authentication unsuccessful error. Should I use port 25 instead of 587
$ ./swaks --auth --server smtp.mailgun.org --au postmaster@mg.rethinkhoa.com --ap <same password as the one in the config.production.json> --to rei...@gmail.com --h-Subject: "Hello" --body 'Testing some Mailgun awesomness!'
=== Trying smtp.mailgun.org:25...
=== Connected to smtp.mailgun.org.
<- 220 Mailgun Influx ready
-> EHLO ip-...
<- 250-a4e698e106a8
<- 250-AUTH PLAIN LOGIN
<- 250-SIZE 52428800
<- 250-8BITMIME
<- 250-SMTPUTF8
<- 250-PIPELINING
<- 250 STARTTLS
-> AUTH LOGIN
<- 334 VXNlcm5hbWU6
-> cG9zdG1hc3RlckBtZy5yZXRoaW5raG9hLmNvbQ==
<- 334 UGFzc3dvcmQ6
-> Y2Y1YjA5ZjU5YjgwZjQ4MDkzZTg5MTNhZTk4YTJmZjAtMzAzNDQ0NzItZWMwYzY5ZmQ=
<- 235 Authentication successful
-> MAIL FROM:<bitnami@ip...>
<- 250 Sender address accepted
-> RCPT TO:<rei...@gmail.com>
<- 250 Recipient address accepted
-> DATA
<- 354 Continue
-> Date: Mon, 20 Mar 2023 17:56:32 +0000
-> To: rei...@gmail.com
-> From: bitnami@ip...
-> Subject: Hello
-> X-Mailer: swaks v20130209.0 jetmore.org/john/code/swaks/
->
-> Testing some Mailgun awesomness!
->
-> .
<- 250 Great success
-> QUIT
<- 221 See you later. Yours truly, Mailgun
=== Connection closed with remote host.
I’m a little bit confused why outlook is mentioned in the error message. My account I’m using with mailgun is an outlook email. I’ve set up DNS entries in Amazon Route 53 and the Mailgun confirms the configuration with the green check.
Error sending email! Error sending email: Failed to send email. Reason: Invalid login: 535 5.7.139 Authentication unsuccessful, the user credentials were incorrect. [MW4PR02CA0023.namprd02.prod.outlook.com 2023-03-20T18:40:54.621Z 08DB27FEA98F708E]. Please check your email settings and resend the invitation.
Ooooh! I was so excited…but that was one of the remnants of trying out different things. I tried to see if I could get it to work with the sandbox email and forgot to change it back.
Looking at your DNS, everything looks good, albeit you don’t have an SPF record for the bare domain. The authentication error from outlook.com makes no sense if you’re using MX records for mg.rethinkhoa.com.
Please share config,production.json in its entirety, obfuscating any passwords etc., and make no changes to the file until I come back to you.
Well, I’m struggling to see anything wrong with your setup, especially since Swaks works for you. Did you restart Ghost (ghost restart) after making config changes?
Hey there. I have run into the same problem seemingly. I’ve read all posts containing the error messages I’m receiving and none of them have provided any solution.
I just edited this post to give a lot of details. For anyone that comes here after this edit:
Ensure that you have the correct SMTP address in your config.production.json.
I had changed it to smtp.mailgun.com and that failed my authentication attempts for good reason. The address I’ve setup in Mailgun is smtp.eu.mailgun.com. Notice that eu.-addition? That’s the solution for me.