I’m having trouble setting up Google G Suite SMTP emails in modx. I’ve tried adding the setings to the SMTP settings in modx and i’ve installed Quick Email but i’m getting an error.
Is that the output of QuickEmail with &debug=`1` ? That should be more explicit about what part of the connect it fails on (but be careful about posting that, because it may include your username/password).
Could just be that you need to try different ports.
Sorry if I gave the wrong impression. Adding &debug=`1` would not fix it, but should’ve shown you more debug information than what you’ve posted here to clarify what part of connecting went wrong.
Debugging email is tricky without all the information. For all we know there’s a typo in the username or the smtp host, or the server blocks outgoing (note: CloudFlare is incoming) traffic.
I’ve definitely used Google Suite SMTP before so MODX can handle it, but you may need to fiddle with the settings and use QuickEmail’s detailed debugging to see if it gets to the mailserver (means host, connection prefix, and port are correct) and if the username/pass are vallid (e.g. if you use 2FA, you need an app password).
From the message SMTP connect() failed I suspect it’s not getting to the mailserver yet, so the host, prefix, or port are not accepted. Try port 587 instead of 465 for example, and connection prefix tls instead of ssl.
Sorry i didnt give enough detail. I placed the full quickEmail snippet into the resource but it wasnt showing any more info on the quickEmail page. Until i manually cleared the cache!
Now i’ve got a page full of info. The main issue looks to be that the username and password were not accepted. SMTP ERROR: Password command failed and SMTP Error: Could not authenticate.
I know the credentials i have used have been input correctly.
I will look into an app password for 2FA but i did dissable 2FA a few days ago for the purpose of diagnosing this issue. I’ve found a link to using Gmail as an SMTP relay at this link, i’ll let you know how i get on.
If you can think of anything else to help i would greatly appreciated.