arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] wp_mail() function - Wordpress
#5
@Rehan

Despite the title, the topic has little to do with it (in the direct). You are directly requesting for help with a Wordpress blog and a form plugin for it. While the (in the title) mentioned function only hints towards the problem it isn't what causes the problem. This is being validated by your additional information that you posted on my request. So all in all you are requesting help for a web application and its plugin which is unrelated to scripting and programming (it is at least indirectly related).


Now to the main issue of this. You host the blog on your own VPS without a local mail transfer agent (MTA) or mail server. What that means should be obvious: you cannot send or receive any mail from or to the VPS. If that wasn't clear, I hope it is now. It is like attempting to drive a car without wheels.

Wordpress itself (rather said its wp_mail() function) heavily relies on using a local MTA or mail server to send out any kind of mails by default. This can be changed of course, by using either a plugin that rewrites wp_mail() to use a 3rd party service (GMail, Sendgrid, etc...) or by using plugins that come with their own SMTP server setup where you then can use a 3rd party service to send mails. You have decided for the last option by changing to "WPForm SMTP".

Now to the new problem "subscribe plugin is not able to send mails.". That is still because of the main root cause. The subscribe plugin relies on the wp_mail() function that doesn't work properly on your server due to a missing MTA or mail server. The SMTP setup from WPForm SMTP will no apply/work for other plugins. To solve this you either need a plugin that fully rewrites wp_mail() to use a 3rd party service or again a subscription plugin where you can specify an external SMTP server. Beware though that depending on the plugin, even with a rewriten wp_mail() function, it might still not work properly because it ignores changes of the main default Wordpress function and might use its own function that only relies on basic information from wp_mail() function like mail server, port, address and such.

I would say though that it is worth a try to test a plugin that rewrites the wp_mail() function to use a custom SMTP server like this one: https://wordpress.org/plugins/easy-wp-smtp/

I used one that worked really well years ago when I hosted Wordpress blogs for some friends and associates. Unfortunately I can't find it now. Maybe it is no longer working due to major version upgrades with Wordpress or it has rebranded to a different name. I don't know.


Unfortunately I cannot help with deciding for which of the both posted plugins to go. I have no knowledge about what the subscription plugin is for to give any ideas or advices. Hopefully the others have ideas or plugins about that Smile .
[Image: zHHqO5Q.png]
lockThread Closed 


Messages In This Thread
RE: wp_mail() function - Wordpress - by Mashiro - 06-02-2019, 03:50 PM
RE: wp_mail() function - Wordpress - by Rehan - 06-03-2019, 11:36 AM
RE: wp_mail() function - Wordpress - by Mashiro - 06-03-2019, 02:18 PM
RE: wp_mail() function - Wordpress - by Rehan - 06-03-2019, 03:17 PM
RE: wp_mail() function - Wordpress - by Mashiro - 06-03-2019, 03:33 PM
RE: wp_mail() function - Wordpress - by rudra - 06-07-2019, 11:16 AM
RE: wp_mail() function - Wordpress - by Rehan - 06-09-2019, 11:04 AM

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting