Skip Navigation

[Resolved] WP Mail SMTP plugin + Toolset = won't send form notifications

This support ticket is created 2 years, 8 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 15 replies, has 3 voices.

Last updated by jennZ 2 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#2300517

I know there is a known issue with this plugin (unless this is a different issue, which it may be?). I already referred to the following post and added the indicated code snippet, though, and it didn't help:
https://toolset.com/forums/topic/toolset-post-form-not-sending-emails-when-wp-mail-smtp-active/

When the WP Mail SMTP plugin is active, it gives me the following message:

SMTP error from remote mail server after end of data:
    550 Messages should have one or no To headers, not 2.

It seems to be trying to add the recipient to the senders twice, sometimes along with the From email address for some reason, resulting in 2-4 To headers and the above error. I'm having trouble figuring out where I can deactivate whatever in Toolset is causing it to add the additional header(s) and thus to fail to send.

When WP Mail SMTP is deactivated, everything sends just fine, so I've had to deactivate it for now, but I need to re-activate it soon for other aspects of my site.

#2301141

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

Where do you see that error?

I just set up SMTP with that plugin on a local test site, and I'm not seeing any errors. Do I need the pro version to see the same?

I checked whether a form notification is adding 2 To: headers, and it doesn't appear to be, but if I can reproduce the same error you describe I can try and debug this locally.

#2301161
Undeliverable Form Notification Header.PNG

It's not in WordPress; it's a Mail Delivery System email (the kind that comes when an email is undeliverable). They don't show up in the WP Mail SMTP Pro log at all. I got the Pro version of WP Mail SMTP, but I can see if it does the same with the Pro version. I've also attached a screenshot in case that helps.

#2301401

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jenn,

Can you confirm that this issue doesn't occur with version 2.6.0 of the WP SMTP Mail plugin ?

You can download the previous version by scrolling to the bottom of the page in the link below.
https://wordpress.org/plugins/wp-mail-smtp/advanced/

I see where other customers are reporting a similar issue and saw that this plugin was recently updated last thursday.

Please let me know.
Thanks,
Shane

#2301455

Sure thing. I installed that and the issue still occurs with the (non-Pro) 2.6.0 version of the WP Mail SMTP plugin. Also, that version is OLD. The plugin is currently on version 3.3.0.

#2302131

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jenn,

Thank you for the update. Do you have the option of using an alternative SMTP plugin? Our 2nd team managed to perform some tests and found that the WP Mail SMTP isn't working as intended.

They recommend not using this plugin and try using the POST SMTP plugin as an alternative.
https://wordpress.org/plugins/post-smtp/

Please try this plugin and let me know if it works for you.
Thanks,
Shane

#2302135

Seriously?? I literally just paid for the Pro version of this plugin. Is there really no way to get Toolset to play nicely with WP Mail SMTP Pro?

#2303117

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jenn,

Unfortunately I cannot speak of a way to make it work given that there are other SMTP plugins that work without any issues. As you mentioned this recently started to happen, which mean the fault is perhaps caused by an update in the WP Mail SMTP Pro plugin.

My advice is that you get in touch with the support team for the plugin so they can have a look. They are better equipped to debug this issue than we are here.

Thanks,
Shane

#2303423

I've gotten in touch with WP Mail SMTP's team and they've asked if there's a way to switch Tollset's email notifications to use wp_mail() function instead of the default PHP mail function. They said this is what seems to be causing the issue with emails not being routed correctly.

#2305751

Any response on this?

#2305813

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jenn,

We are using the wp_mail() function to send out our notification mails.

Our supporter in the thread below explained this in some detail so my advice is to give the thread below a read as there is not much else we can do here.
https://toolset.com/forums/topic/toolset-forms-routes-notification-emails-to-local-server-when-it-should-not/#post-2301935

If there are any further questions please let me know.
Thanks,
Shane

#2308025

The WP Mail SMTP team is looking into this, so I'll report back if we're able to find a solution or if there's nothing they're able to do to fix it. I know this is an issue for a number of folks based on the recent surge of tickets on here, so hopefully they'll be able to find a resolution for us all!

#2310487

The WP Mail SMTP team has looked into this more - they've accessed some things through FTP and I sent them the header file from the emails that failed and they noticed some things. This is what they asked me to pass along:
"Upon checking, I noticed that specific email was not sent using the WP Mail SMTP plugin. You can see the name PHP Mailer under the "X-Mailer" header (see: hidden link).

If that email is sent using the WP Mail SMTP plugin, you should be able to see our plugin name under the "X-Mailer" header (see: hidden link).

As I have explained earlier, Toolset notification bypassed the WP Mail SMTP configured mailer. You can ask Toolset support to see if there's a way to force their notifications to use the WordPress default wp_mail() function (https://developer.wordpress.org/reference/functions/wp_mail/)."

I know you say that Toolset uses the wp_mail() function, but it looks like that may not be entirely the case based on what they found or else it's messing something else up. The email headers I forwarded them were sent when the WP Mail SMTP plugin (and ONLY that SMTP plugin) was active, so it SHOULD have been sent with WP Mail SMTP, so the only thing we can figure is that Toolset bypassed it somehow...

#2311071

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Jenn

I'm sorry, but I don't have anything to add than in the other thread that Shane linked to (https://toolset.com/forums/topic/toolset-forms-routes-notification-emails-to-local-server-when-it-should-not/#post-2301935).

I used Xdebug to step through the code execution line-by-line when the notification was sent, and as described it simply prepares the email details and then uses the core WordPress wp_mail function to send it.

We don't have some secret code that we use as an alternative when WP Mail SMTP plugin is active, it's the same code that runs every time (including with the Post SMTP plugin, which works).

I can't account for why WP Mail SMTP would ordinarily intervene to take over sending the email but doesn't in this case, I'm afraid.

#2311265

I was not implying that Toolset was intentionally sabotaging WP Mail SMTP or something, thank you very much. Thank you for looking into the Xdebug, though. It's extremely disappointing that there's nothing that can be done to fix the issue between Toolset and WP Mail SMTP, but I guess I'm switching to a less-than-ideal SMTP plugin in the meantime. I'll pass on the Xdebug info to the WP Mail SMTP team as well, in case this comes up for any of their other customers in the future.