Skip Navigation

[Resolved] Post form submission email notifications are not being sent

This support ticket is created 3 years, 6 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 19 replies, has 3 voices.

Last updated by Minesh 3 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1807813

I use several post forms, and all have an email notification set up to be sent when the form is submitted. None of the email notifications are being sent.

It's not just that that are being sent but not received...I use WP SMTP which logs everything that is sent, and although other form notifications are being sent, it never logs any Toolset post form submissions.

This only recently stopped working.

#1808757

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Recently, I see couple of users reported this issue and when they deactivate the WP SMTP plugin, the issue is resolved.

Can you please try to deactivate the plugin WP SMTP and check if you see email notifications working?

#1809105

Yes I can confirm that disabling WP-SMTP plugin allows the form's notifications to be sent. However, I obviously can't leave it disabled, as email deliverability is crucial. Can you fix this please?

#1809773

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share problem URL where I can see the form and tell me what email notification is not working.

I have set the next reply to private which means only you and I have access to it.

#1810629
#1810901

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you for the access details.

With the staging site you shared - you were using the outdated forms plugin which I updated to latest version.

Then - I run a test and I found all email notification settings for form is OK. When I deactivate WP SMTP it does work..

That means email notification works as expected when WP SMTP plugin is deactivated and the error is from WP SMTP plugin:

PHP Fatal error: Cannot declare class PHPMailer\PHPMailer\SMTP, because the name is already in use in /home/funoutsi/public_html/hr.wtn.com/wp-includes/PHPMailer/SMTP.php 

I see that this is reported with WordPress.org as well:
=> https://wordpress.org/support/topic/php-fatal-error-cannot-declare-class-phpmailerphpmailersmtp/

Can you please check with WP SMTP support and check with them as error only happens when WP SMTP plugin is active. If they found and say that error is from Toolset (which I dont think this is the case) we are happy to help.

#1811691

OK, I've had a dialogue with the developer of the WP-SMTP plugin. They state that the error is unequivocally due to Toolset and that actual cause is that Toolset has likely not been made compatible with WordPress 5.5.x. Apparently a change was made to PHP mailer with WP 5.5, and all plugins that send emails need to make a change in turn.

The WP-SMTP plugin has been changed to account for the change in WP 5.5. Toolset also needs to be changed.

Here's a link that may provide more insight: https://wordpress.org/support/topic/fatal-error-on-wp-5-5-and-wp-mail-smtp-2-2-1/

#1811965

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Eric,

The thing is that Toolset Form do not use the PHPMailer class, we use the wp_mail() function:
=> https://developer.wordpress.org/reference/functions/wp_mail/

Here is a test site with test page where I've installed and activated WP SMTP plugin:
=> hidden link

Where I've setup the email notification on submit - you should change the email to your email to get the email in your inbox in email notification settings:
Form in Backend => hidden link

Admin login:
=> hidden link
User: demo
pwd: Admin@999

When I fill the form and submit I do get the email notification even the WP SMTP plugin is active.

It seems to me based on the link you shared:
=> https://wordpress.org/support/topic/fatal-error-on-wp-5-5-and-wp-mail-smtp-2-2-1/

There are other plugins that also use the PHPMailer and that should have a conflict. What if you check with only Toolset + SMTP plugin active? Do you see any difference?

Also, what if you try to test email by adding contact form 7 plugin and see if email is sent?

#1812949

I did some further testing today and found some results which may provide clues as to what is going on.

First, I created a new post form "Test2" for editing the Lodge post types. I set up the email notification to send the email directly to me. I displayed the form on a page using

[cred_form form='test2' post='21973']

then visited the page and filled out the Test2 form. The notification was received! However, it did not appear in the WP-SMTP email log.

Then I tested a different form, one for submitting new "Deals" post types. When submitted the email was received, however again the notification was not in the SMTP email log.

Then, I tested a non-Toolset form (built with Formidable Forms). The email notification was received and DOES show up in the WP-SMTP email log.

So why is the "Lodge Details Page Approval" post form not sending email notifications, yet the other are? And why do the Toolset form notifications that DO work, NOT show up in the SMTP email log?

Finally, I inspected the "Lodge Details Page Approval" form to see if there was anything unique about how it was set up. I noticed that it was set to send to "Send notification to a WordPress user" but the email address was one that did not exist. It had since been changed. i switched this to "send notification to a specific email address". After changing this, and testing again, the email notification was received (but still not captured in the WP-SMTP log).

I changed the configuration of the post form notification on my Production site to be the same way it is set up on my staging site. After testing, the email notification was still not sent. The only thing difference between the production site and the staging site is that the production site still has the older version of Toolset Forms (which has the incompatibility with WP 5.5)

Here are my conclusions:

1. Email notifications sent from Toolset do not follow the standards for WP, and therefore are not sent via SMTP. This is a problem as it may affect email deliverability.
2. The setting "Send notification to a WordPress user" should link to the actual user account and use whatever email is set for that user. Otherwise this is just the same as "send notification to a specific email address". It doesn't match user expectations, and this could have avoided all this troubleshooting effort.
3. There is indeed a bug in Toolset Forms prior to the current version 2.6.1. This is why it still doesn't work on my production site.

I am not able to update to a later version of Toolset forms on my production site. if you could kindly provide me a downloadable version of this plugin I could update my production site and put this issue to rest.

#1814033

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you for sharing all the detailed information and your findings.

You can find all the version for the Toolset Form with the following link:
=> https://toolset.com/download/toolset-cred/

You should download the version you require.

Regarding your findings:
1. Email notifications sent from Toolset do not follow the standards for WP, and therefore are not sent via SMTP. This is a problem as it may affect email deliverability.
==>
I will check with concern person.

2. The setting "Send notification to a WordPress user" should link to the actual user account and use whatever email is set for that user. Otherwise this is just the same as "send notification to a specific email address". It doesn't match user expectations, and this could have avoided all this troubleshooting effort.
==>
Will try to run few test with notification option set as ""Send notification to a WordPress user".

3. There is indeed a bug in Toolset Forms prior to the current version 2.6.1. This is why it still doesn't work on my production site.
==>
What Toolset Form version you are using on the production site? And what are the notification settings?

#1815033

I have updated the Toolset Forms plugin on my production site.

I'm still very concerned that Toolset doesn't send emails via SMTP.

#1818871

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I would like to correct few things here.

We use the WordPress wp_mail() function to send the notification and which I've corrected with my previous reply so it should not mislead the other users.

We do follow the WordPress standards to send the emails.

I wonder why WP SMTP plugin is not able to log the emails you send. what if you try to use the following plugin:
=> https://wordpress.org/plugins/wp-mail-logging/
- Do you see every email is logged?

Can you please point me out the exact settings I should use that should lead me to see the issue on my test site which I shared here:
=> https://toolset.com/forums/topic/post-form-submission-email-notifications-are-not-being-sent/#post-1811965

You can setup the WM SMTP configurations there and setup form with notification and I would be happy investigate further.

#1819343

I installed the WP Mail Log plugin, then submitted a post form to test. It logged the email notification, however WP SMTP still did not (presumably because the email is not sent via SMTP).

For the WP SMTP settings, I just use my own SMTP account (provided through MailJet), set to "Other SMTP" then enter credentials. I obviously can't provide my SMTP credentials, you'll need to use your own. I am also using the Pro version of the plugin.

#1822463

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

But the thing is that, if SMTP is not sending email then how it can log it but as shared and you confirm as well the plugin I shared WP Mail Log plugin does record the email logs - correct?

What I would like to know now, at what instance the email is not sent using SMTP? Using what form's settings? Would you be able to setup such form email notification on my test site with any of the form (maybe you can create a new one or use existing form I shared) and see if that works or not?

The thing is that I do not see any other reported such issue otherwise our forum will be full of related tickets but thats not the case for now, so it's important for me to know at what action and with what setting the email notification is not send. Once you shared this info either you can test it directly on the test site I shared or I will give a shot once you share all this required information.

#1822823
form.jpg

The WP Mail Log plugin records Toolset form notification emails because it's sending the emails via plain PHPmail.

WP SMTP is not logging any Toolset form notification emails because it sends all emails via SMTP.

The problem I believe is that emails are always sent from Toolset via plain PHPmail, even when SMTP is set up via a plugin like WP SMTP.

All emails from all other form plugins are recorded in the log. It's only Toolset that is forcing the use of PHPmail and therefore the emails are not being logged in WP SMTP.

> What I would like to know now, at what instance the email is not sent using SMTP? Using what form's settings?

The exact setting used for the form are shown in the attached image.

I can set up a form with a notification like this on your test site, but you'd need to set up an SMTP account to send the emails with.

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