Message not being sent from contact form module

Hi guys, hope you’re all well?

Have just tested a Beaver Builder form I added to my contact page and it’s not working.

When the form is submitted it shows the message sent notification under the form, but the message isn’t being delivered to the address configured in the module settings.

Any ideas?

Will post the URL in a private reply…

Aha, I just changed the email address to send the submission to in the contact form module settings and it worked.

I’m wondering if it’s a problem with my email address?

It worked sending the form submission to an email address ending .co.uk, but it wouldn’t work sending to an email address ending .uk

Do you think the contact form module didn’t recognise a .uk email address maybe? I need it to go to this address as I’m rebranding…

[Content Hidden]

Hey Lee,

Did you check if it’s in the Spam folder? Our Contact Form module is using the wp_mail() function which is similar to PHP’s mail() function and we’re not doing any special checks to the recipient email address, except the usual.

The problem could be with your email provider or hosting. Either the email get sent through or you didn’t receive it, or the email didn’t really get sent. Some hosting requires an SMTP plugin so the emails work right(not really an expert on that field). Would it be possible for you try using another form plugin and see if you get the same problem?

Ben

I could do but that’s a bit of a pain in the behind…

I’ve been getting emails to that address all day, including the notification that you updated this thread. So my email address is working fine.

I’ve checked the spam folder as when I tested to the other email address it went into spam. But they aren’t getting spammed either.

So to me this means they’re not being sent.

5 minutes later…

OK so I just added a Jetpack contact form to the site, and set it to notify the .uk address as I did before, and tested it.

This one didn’t work either!

Seems to be a problem then with WordPress sending to a .uk address. Will have a Google around, if you have any ideas do let me know cos I’m stuck!

Hey Lee,

Sorry, not really an email expert here. You could try getting in touch with your hosting company and check with them and see what they say. Alternatively, you can post the same question over to the FB Group and/or Slack Channel and see if someone experienced the same problem and has a solution for you.

Ben

Hi Ben,

Thanks for the fast support, really appreciate it :slight_smile:

I’ve fixed it now and you were right, the problem had nothing to do with BB at all.

For the benefit of anyone else that reads this thread, I’m told that this is a fairly common problem with PHP forms where the domain that the form is hosted on matches the domain that the notification email that the form is trying to send to.

In my case, the DNS records for this domain are hosted with GoDaddy, the website is hosted at SiteGround (domain pointing at my SiteGround IP address via an A Record) and my email is hosted by Google Apps for Work (with all the correct MX records in place).

Apparently this PHP form issue causes the form to try and send the notification “locally”, so n my case it only made it as far as GoDaddy and didn’t reach the MX records for my domain. And as it didn’t see the MX records, it couldn’t make it to my Google Apps inbox.

The solution was actually pretty simple.

When you host with Google Apps for Work, every user (and every user alias you create for your users) gets given a temporary email address that’s auto-generated by Google.

I don’t want to share my email in the wild so as a fictitious example, a Google Apps for Work user with the address [email protected] gets another Google address like this:

[email protected]

If you use this temporary address you get round the PHP form issue caused by the matching domains, but it goes to the [email protected] inbox as it’s basically an alias.

Phew…just added that for the benefit of other people that may have the same problem - I don’t understand it but it’s working now so I’m happy :slight_smile:

Thanks again,
Lee

1 Like

Hey Lee,

Thanks for sharing! I wouldn’t say I totally get it as well but I’m just glad you got it working! :slight_smile: Enjoy BB! :slight_smile:

Ben

Hey Lee

where can i find the alias to my google apps for work email id?

Thanks

Veer

Hi Veer,

I am not familiar with Google Apps for work, but I do believe there is a page called My Applications, it is likely listed there.

Thanks,
Danny

Hi Veer,

You need to go to the Admin Console for your domain. I navigate there usually via the settings cog on the top right of Google Mail. The steps are:

  1. Click that settings cog in GMail, then click on Manage this domain.

  2. The next page is called the Admin Console, and you should be presented with a number of icons in the middle of the page. The first option is most likely to be Users - this is the one to select.

  3. After clicking on Users you’ll then need to click on the relevant user on the next page.

  4. Then when the user info page loads, you’ll see an option near the top of the list called Account, which you should click on next.

  5. Finally, the test email address created by Google will be shown near the top of the page you land on after clicking Account, near the top of the page, under Contact Information.

Worth checking by following the steps above, but I believe that the format for Google Mail test emails is the same for everyone:

<[email protected]>.test-google-a.com

It’s basically just .test-google-a.com pasted on the end of your email address.

Finally…if you use this test email address for your form, submissions will go to your inbox the same as if you had added your main email address to the contact form settings.

Hope helpful,
Lee

1 Like

Thanks Lee, appreciate the assistance.

Thanks,
Danny

Thanks Lee! very helpful information!

Just wanted to follow up on this for the benefit of anyone else with the same problem.

Definitely nothing to do with BB and a number of workarounds discussed here:

https://wordpress.org/support/topic/plugin-contact-form-7-wont-send-emails-to-same-domain

And here:

http://stackoverflow.com/questions/1107730/cant-send-email-to-addresses-at-my-own-domain

tl;dr

Either get your webhost to “turn off local mail delivery”, or get your WordPress site to send via by SMTP instead of using PHP’s mail() function. There are plugins around for the latter I believe.