Modx 3 Passwod Reset issue

Hi There

Users on my MODX3 site cannot reset their password. When they try to reset it, after hanging for several seconds, it finally throws this error:

Error while sending mail to

It doesn’t specify anything after ‘to’.
And doesn’t send an email.

I have SMTP set up to send emails, and I have a working form (using formit) on the site - the submissions come through nicely.

Any ideas?

Currently I have to manually reset password for users which isn’t ideal.

Thanks
Andy

I’ve just checked the logs and I get this error:

[2024-01-15 09:43:08] (ERROR @ /home/site/public_html/core/src/Revolution/modUser.php : 957) Error while sending mail to user@gmail.com: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

But SMTP works for form submissions?

I’ve tested it with Quickmail and this is the debug info:

Server Debug Information:

2024-01-15 09:45:32 SERVER → CLIENT: 220 XXXXXXXXXXXX.XXXXXXX.office365.com Microsoft ESMTP MAIL Service ready at Mon, 15 Jan 2024 09:45:31 +0000

2024-01-15 09:45:32 CLIENT → SERVER: EHLO www.domain.com

2024-01-15 09:45:32 SERVER → CLIENT: XXXXXXXXXXXX.XXXXXXX.office365.com Hello [XX.XXX.XXX.XXX]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8

2024-01-15 09:45:32 CLIENT → SERVER: STARTTLS

2024-01-15 09:45:32 SERVER → CLIENT: 220 2.0.0 SMTP server ready

2024-01-15 09:45:32 CLIENT → SERVER: EHLO www.domain.com

2024-01-15 09:45:32 SERVER → CLIENT: XXXXXXXXXXXX.XXXXXXX.office365.com Hello [XX.XXX.XXX.XXX]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-AUTH LOGIN XOAUTH2250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8

2024-01-15 09:45:32 CLIENT → SERVER: AUTH LOGIN

2024-01-15 09:45:32 SERVER → CLIENT: 334 VXNlcm5hbWU6

2024-01-15 09:45:32 CLIENT → SERVER: [credentials hidden]

2024-01-15 09:45:32 SERVER → CLIENT: 334 UGFzc3dvcmQ6

2024-01-15 09:45:32 CLIENT → SERVER: [credentials hidden]

2024-01-15 09:45:38 SERVER → CLIENT: 535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. [LO4P302CA0036.GBRP302.PROD.OUTLOOK.COM 2024-01-15T09:45:38.430Z 08DC150C2C489E6C]

2024-01-15 09:45:38 SMTP ERROR: Password command failed: 535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. [XXXXXXXXXXXXXX.PROD.OUTLOOK.COM 2024-01-15T09:45:38.430Z 08DC150C2C489E6C]

SMTP Error: Could not authenticate.

2024-01-15 09:45:38 CLIENT → SERVER: QUIT

2024-01-15 09:45:38 SERVER → CLIENT: 221 2.0.0 Service closing transmission channel

SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub

So looks like SMTP isn’t working after all.

Are you sending through Gmail? Gmail now requires you to set up an App password to use as the SMTP password.

Thanks Bob. No it’s from outlook365.

To my understanding Microsoft was removing basic auth for SMTP as of January 1, 2024. As such, you’d need to have a way to authenticate your application (MODX) differently or to use a third-party ESP.

At MODX Cloud we recommend for low volume sites, the free service SMTP2GO. It seems to work well enough.

1 Like

Aha! That’s interesting. It does coincide with it failing - it was working fine before Christmas. I will check that out. Thanks so much!

SMTP2GO’s free service is limited to 1,000 emails per month and you only get reports for 5 days. If you don’t need reports, and can stay under the limit, it’s a great option.

If you do want reports, Mailgun is excellent, and almost free if you don’t send that many emails (I use it at Bob’s guides, and every once in a while, I get a bill that’s usually less than $2.00 – I think I got one or two bills in all of 2023) . Their reporting is very good. You can see hard and soft bounces, which users actually opened the email, and more.

It takes a bit of setup, but they walk you through setting up SPF, DKIM, and DMARK. The upside is that none of your messages end up in the spam folder, so you get great deliverability.

You might take a look at the Notify and Subscribe combo. It has built-in Mailgun support (though you still have to set up the Mailgun account), and you can create a resource that contains your message and send links to it to members of user groups, and/or users with an interest in multiple topics, or all users, with an automatic link to unsubscribe or manage their preferences. It also handles registration through a registration page the lets them set preferences.

Thanks for this Bob - very comprehensive!

I looked at Mailgun, but it seems that they’ve changed their pricing for new accounts - it’s $35 USD per month now. Perhaps you are on a free tier which is no longer available.

I think SMTP2Go should be OK for now, as the site it’s on doesn’t get a huge amount of form submissions - but I would have to look at something else once the site scales up. I’m happy to pay for the service at some point, but this is for a small startup so cannot really justify the additional costs.

Another option that I’ve been using recently is Amazon’s Simple Email Service (SES). It doesn’t allow as much in the free tier (200/month in sandbox mode), but it’s pretty cheap once you get into paying per x emails. More and more hosting companies and others who’ve allowed users to run their own smtp on their servers are moving to disallowing it in an effort to keep their IPs clean. This goes for using php’s internal mail functionality as well. Incoming, yes. Outgoing, no. Annoying, but I get it :wink:

Thanks I will check that out too.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.