SPForm errors using SMTP

QuickEmail says Send reported successful

SPForm consistently throws this error:
Sorry - Mail system reports failure in sending message
The most likely cause is an invalid return email address.
Note: If ISP mail() function is blocked, Webmaster should try SMTP option

System Settings: Registration Email, and Mail Settings use the same email address. The smtp settings, password, ports are verified.

I’m on the MODXcloud and nothing seems to be working. I don’t have a Property Set for this, just the default SPForm call from the initial install.

What am I missing?

I assume that you have the mail_use_smtp setting turned on.

Are you using Gmail’s SMTP server?

Do you have the &recipientArray property set in the SPForm tag?

mail_use_smtp: Yes

smtp.google.com: It’s a Google Workspace email with same domain name as allowedReferrers. 2FA was setup and an App password was created, but failed due to connection timed out. Must it be a Gmail address in order for SPForm to work?

&recipientArray=Contact: addressHidden@gmail.com This Gmail address is not a part of the workspace. It uses 2FA and the person controlling it isn’t a part of the Google Workspace.

Blockquote
Must it be a Gmail address in order for SPForm to work?

I’m not really sure, but it seems likely that the App password would have to be associated with the Google account it was created through. On the other hane, the fact that QuickEmail worked might suggest the opposite.

It’s sometimes necessary to give the sender an email account with the right to send emails at your ISP.

It probably doesn’t matter, but I would take out the space in this line:

&recipientArray=`Contact: addressHidden@gmail.com`

QuickEmail uses the emailsender System Setting (unless you provided an alternative), so you might try using that email for the from and reply-to address just to see if it makes SPForm work.

FYI, I was messing around with QuickEmail and managed to get that exact error message.

I believe I got the message by turning on SMTP in the System Settings and having the server name wrong. Hosts often require a different server name for sending email, and sometimes they move you to another server and don’t tell you. Once I turned off SMTP, QE worked again.

You might try Googling {Your ISP} SMTP settings.

I hate diagnosing email problems more than anything else I do in MODX.

1 Like

Hi Bob,

Thank you for spending time troubleshooting. I appreciate a second set of eyes.

I’m going to mess around later this week and see what’s what. I think Google workspace doesn’t like a different server using credentials to send email, which I thought was the whole point of having an App password so that it could.

I have FormIt up temporarily and remember why I don’t use it: spam.

I keep forgetting that I can use DNSchecker to to see what the DNS settings are, and then I can ping it in Terminal to see what the IP# is, and maybe that’s what Google does. Here’s the domain I’m using:

And I can always check the DNS MX settings in the MODXcloud - I forget how useful the cloud is.

After just 1 day of using FormIt all 3 email addresses it sends to is is spammed. It’s almost as if obscuring a mailto:emailaddress would be better but that requires an email client that some people just won’t use.

I forget to use Captcha because that requires another administrator who might not know how that works — I don’t — and then it still boils down to why wasn’t the 2FA App Password honored?

I don’t know if this helps, but I’m pretty sure the address of the sender of the message doesn’t have to match the “reply to” address.

I should mention that I use SPForm at Bob’s Guides. When I saw your message, I checked it and it also didn’t work (though there was no error message). I didn’t want to bring that up until I was sure the problem was not in SPForm. It wasn’t. It turned out that the host had changed the name of the server.

I get no spam with SPForm (even with most of the hard-core anti-spam measures like Captcha turned off), but that may be misleading because the emails come through Gmail, which does a pretty good job of filtering spam.

SPForm does not expose any email addresses in the source code of the form. That might be possible with a FormIt hook that executes before the email hook, I’ve never looked into it.

1 Like

Nothing is working. I tried using ModMore and Askimet. The spam filter works, but completing all fields using FormIt fails to send and redirect.

Do you have a password manager that might be filling in the hidden input that’s used to detect spambots?

The only other thing I can think of is that the message sender isn’t fully authorized to send messages on your host.

I don’t use an online password manager, and I don’t save passwords in the browser. I use Password Repository.

I agree with you about the sender not being fully authorized. I’m not sure where to troubleshoot that because the emails originate at Google, not a regular Registrar like I’m used to.

Google Workspace says to use smtp.gmail.com, but the original Wordpress.com DNS had smtp.google.com. When I try that it fails spectacularly. When revert to smtp.google.com it’s just one error: 110 can’t authenticate, connection timed out.

I went back to look at the DNS in the MODXcloud that I copied before the WordPress.com website version of the site I took over crashed.
v=spf1 include:_spf.google.com ~all

That means the mail can only originate from Google Workspace.

The next step is to add another TXT SPF record or modify the existing SPF TXT record to include the MODXcloud IP#

I think we’re done here. Thank you so much Bob, I couldn’t have done it without you. Once I get that squared away I’ll have achieved a University Certificate in Email Problems and How To Troubleshoot Them.

Don’t thank me until it works. :wink:

I’d say you’re now better at diagnosing email problems than I am.

Hi Bob,

v=spf1 include:_spf.google.com ~all in a txt record didn’t work. smtp.gmail doesn’t work at all.
What did work was using a different domain that is tied to the same IP# of the modxcloud.
v=spf1 a mx ip4:169.61.52.206 a:smtp.privateeemail.com -all

Quickmail shows that I got everything working, or at least a successful message.

The problem now is that FormIt does actually send the email nor does it redirect to the Thank You page. I wonder if the Akismet hooks are the problem.

WordPress Contact form is so easy and this is issue is making me look ridiculous. I’m going to install SPForm because my self-esteem cannot handle anymore of this.

The FormIt behavior suggests that at least one of the hooks ahead of the email hook is not returning true.