SMTP Not Working
-
There are so many things I love about this plugin, thank you
Unfortunately, the most important module is failing for me, the SMTP module
I have performed various tests to confirm this (i.e. blocked execution of wp_mail, competing products, etc.)
The test email, bundled in the module, works fine but no email from WordPress or WooCommerce gets sent, and there’s no log to indicate why
Can you suggest troubleshooting steps to dig a little deeper, and possibly test on your side to determine what’s going wrong
-
Hey, thanks for the kind words about the plugin. Sorry to hear you’re having issues with the SMTP module.
Are you able to tell me a bit more about your setup? Are you using standard IMAP account, an email sending service? Is it all emails or certain emails?
Yes, happy to elaborate
- I created a code snippet to prevent mail from using the native wp_mail routine
- I created an email address at my host, for the same domain, specifically for SMTP use
- I tested various features on the site that trigger mail, nothing was sent, which is expected without wp_mail available
- I enabled WP Extended SMTP module
- I tested the website again (forgot password, contact form, woocommerce, etc.) and still no mail
- I disabled WP Extended SMTP module
- I installed a competing product, mail started flowing
- I disabled that product, installed a second competing product, mail continued to flow
- I disabled the second product, and enabled WP Extended SMTP module
- Mail completely stopped working
Hey, thanks for sticking with this. I have two requests so we can pin down the conflict.
- Could you share the exact code snippet you use to disable
wp_mail? Paste it in full if you can. Let me know where it lives too: a mu-plugin, a snippets plugin, your theme’s functions.php, or somewhere else. - What problem were you trying to solve when you disabled
wp_mail? I ask so we can fix the right thing. If there is a real issue (deliverability, spam, runaway notifications), there may be a better fix than disabling the function.
A bit of context that might help. There is nothing special about how our module sends mail. SMTP plugins work by configuring WordPress’s
wp_mail()function to send through a real SMTP server instead of the default PHPmail()routine. The samePHPMailerlibrary does the sending in every case. The plugin just tells it where to send. All we do is add a UI on top to make it easy to set up.So disabling
wp_maildoes not gain you anything when you have an SMTP plugin installed. It removes the function our module needs to hook into. Depending on how your snippet disables it, that disable can sit on top of the hook we use to take over the send. That is the most likely cause of what you are seeing.We are working on a fix on our side. It should make the module work even if a snippet has tried to disable
wp_mail. That will ship in a future release. For now, I would suggest removing the snippet:- If you did not need it for a reason, removing it costs nothing. Our module will configure
wp_mailto send via SMTP the way you want. - If you did need it for something (for example silencing notifications on a staging site), let me know what for. We can find a more targeted approach.
Thank you for digging into this, let me explain my philosophy, which may be flawed now that I read your feedback
The reason I wanted to disable the default method of sending mail was because I wanted to be certain mail was going through your module, and not through other methods
So, I thought if I disable default mail routines, I’ll know for sure if mail is actually going through SMTP, here is the code snippet I added
I couldn’t think of any other to prove to myself that your SMTP module is actually taking control of all outgoing mail, maybe not such a good idea in retrospect
function rv_disable_wordpress_mail( $return, $atts ) {
return true;
}
add_filter( 'pre_wp_mail', 'rv_disable_wordpress_mail', 10, 2 );You should be able to check whether an email is being sent by WP Extended by checking the email headers for something along the lines of:
X-Mailer: WP Extended v3.x.xThis is how you know if the email is being sent by WP Extended. Sometimes mailservers will strip this however, although you can also check the
from nameandfrom emailit should match what you configured. Otherwise, WordPress will usually send viaWordPress@mydomain.comwhich is a good indiciation the email isn’t being sent through your configured SMTP.Hope this helps clear things up and if you have any other issues let me know.
Thanks but I can’t check the headers because no mail gets sent as soon as I enable the SMTP module, has this been resolved in an upcoming release?
Just to be clear, even without the code snippet above, the SMTP module does not send mail (for me), I have tried with and without the code snippet
Are you able to send mail in your test environment with the current version of WP Extended?
Apologies, I thought you had fixed it. Yes I’m able to send email from the SMTP module with the current version.
Would you be able to share the SMTP details via email to support@wpextended.io please so I can give them a test on my end to see if I can rule out any issues with the SMTP config.
Ok, please give me a little time to setup a test environment for you where you can see things first hand, including a wordpress login and smtp credentials, I’ll send the details to your email and reference this discussion
You must be logged in to reply to this topic.