Formit Autoresponder not working for some email addresses

Using Formit (and Akismet anti spam) in an Modx 2.8.3 environment, I keep experiencing unexpected results with my contact form. Employing the autoresponder hook, I want a notification mail sent to the applicant upon form submission. As a matter of fact, for some email domains, it works flawlessly, for others it does not. Just for clarification, I set up the SPF record for the sending mail adress. But for some strange reason, some mails just won’t be delivered at all, they’re not even listed inside the SPAM-folder!? Neither does Modx report any errors in the logs. I suspect, the sending domain might be blacklisted with some email providers which hence reject the incoming mail?

Any other ideas what might be wrong?

I have found that some email providers have started rejecting email from web forms from domains that do not have DKIM and DMARC set up, in addition to SPF. Short primer on SPF, DKIM, and DMARC.

I also had an issue where email accounts hosted by Microsoft all rejected emails from a web form on a new website. I had to talk to Microsoft to resolve that problem. They said it was because the domain was new and suddenly started sending out email. They allowed the email through once I spoke to them.

Thanks for the advice. I will check it out get back with some feedback that might be valuable to others.

If the above didn’t fix it, I found that if the website was hosted on a server where mail services were also setup fro the domain, but the client had a different Email server address, eg. website hosted on web server, but emails with Gmail or Office 365 etc, then they wouldn’t get delivered. This is because the web host server looked at it’s internal DNS, thought that the emails were hosted locally, and tried to send emails locally to itself on the server. This gave no errors, and no feedback, it just sent it into a blackhole! To resolve this, I simply disabled email services for the hosting account.

Ok, as it turned out, I forgot to add the “fiarFrom” property. Although marked optional in the docs, there seem to be email servers out there which prefer to reject mails that do not feature a “From” property in the header. Just to let you know. Thanks to everyone for the support.

1 Like

worth a PR to the docs!

I think it’s a bug.

The code should use the system setting emailsender, if the fiarFrom property is not set.
But because there is a default property set with the property fiarFrom set to an empty string, this doesn’t work.

So either the following line in the code has to be change

to

$mailFrom = $this->modx->getOption('fiarFrom', $this->formit->config, $this->modx->getOption('emailsender'), true);

or the empty values have to be deleted from the default property set.


You already had the same problem in January:

There is already an issue on Github, but unfortunately it hasn’t been fixed yet.

Damn, and I knew, I tackled this issue before - how embarrassing. But why wasn’t I able to find this issue before posting this question!? Honestly, I am deeply sorry for this duplicate question. I should have researched more thoroughly before posting. At least we know now that the bug filed earlier has not been fixed yet.