Skip Navigation

[Resolved] Form notifications not sent when using WP Mail SMTP

This support ticket is created 4 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by Luo Yang 4 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#1244698

I have a user form that our Membership Secretary uses on the front end to add new members as users. The form has a notification which is sent to the user's email address when a user is created by the form. If I click the "Send a test email" button, the email is sent and I receive it. If I actually use the form, I never receive the email.

I am using a gmail account to send email, routing through WP Mail SMTP. I also have WP Mail Log installed so I can track what is sent. When the test email is sent, I can see it in WP Mail Log as having been sent; I can also see it as a Sent Item in my gmail account; finally, it shows up in my inbox. When I submit the form, the email still shows up in WP Mail Log, but not in Sent Mail, and I never receive it.

I tried deactivating WP Mail SMTP and the mail was sent and received on form submission. When I reactivated it, no email was received. I also tried setting up a very simple notification for a regular post form and had the same result: the email appears in WP Mail Log, but doesn't seem to go any further.

I also use Gravity forms on the site and all of the notifications generated by Gravity Forms forms seem to go out just fine. I did try deactivating Gravity Forms (along with every other plugin except, Types, Forms, Elementor, and Elementor Pro), but that didn't change anything with my user notification until I deactivated WP Mail SMTP, so I don't think it is a conflict with another plugin.

I would think that this was a problem with WP Mail SMTP, except for the fact that the Gravity Forms notifications seem to go out without a hitch. It seems as if something is happening between the email being logged and the actual send with a Toolset form, but I am at a loss as to what it could be or how to find it. Maybe something with the headers?

Any ideas would be greatly appreciated!

#1244918

Hello,

It seems to be a problem of WP Mail SMTP plugin, I suggest you check these first:

1) Check your email box in spam folder, those emails might be taken as spam emails.

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2019, deactivate all custom PHP/JS code snippets, and test again

3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

#1246529

The spam folder was the first thing I checked. The emails are not going to spam.

Because this is a production site, it is difficult to turn off all of the plugins. At minimum, I need to keep Elementor running because that is what allows me to put the site into maintenance mode. This did lead me to think that the problem might have something to do with Elementor, so I tried creating a regular WordPress page and submitting the form from there. (All plugins were still enabled). The notification was sent and received in in this case, leading me to believe I was on the right track.

Next, I tried creating a simple Elementor page with the User form. The page the form is normally used on is moderately complex, so I thought there might be an issue there. When the form was submitted from the simple Elementor page, I was back to the notification showing as sent in WP Mail Log, but not showing up in gmail Sent Mail or my Inbox. This seemed to confirm that there was something going on with Elementor which was interfering with the notification process.

This is when things got strange. I enabled PHP error checking, as you suggested, then submitted the form again. No error log was created, but the notification was both sent and received! I disabled PHP error checking, submitted the form again, and the the notification was no longer received. This made no sense, so I re-enabled PHP error checking, re-submitted the form, and had the same result as when I first enabled error checking.

I am completely baffled and not sure what to try next. I suppose I could leave PHP error checking enabled, but that doesn't seem like good practice and is really just putting a band-aid over the problem rather than fixing it.

Any ideas?

#1246864

In case it is a server/compatibility problem, I suggest you try these:
1) Migrate your website into another test webserver:
https://toolset.com/faq/how-do-i-migrate-a-wordpress-site-from-one-domain-to-the-other/

2) then deactivate other plugins and switch theme, do the debug, get the PHP debug logs, you can ask your server provide to provide the PHP debug logs.

If you need more assistance for it, you can also provide a copy of your website in below private message box, describe detail steps to duplicate the same problem, I need to test and debug it in a live website.

#1247101

I am going to have to put off dealing with this until late next week. I have limited bandwidth here and need to wait until I am someplace where I can work more freely.

I let you know what I come up with.

#1247487

OK, please update this thread when you need more assistance for it. thanks

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.