plugins - How to configure two SMTP Server for wordpress

What I need is : I need to send transactional e-mails from two SMTP configurations.All WooCommerce side of e-mails shoul

What I need is :

I need to send transactional e-mails from two SMTP configurations.

All WooCommerce side of e-mails should send from [email protected]. Example: order summary, delivery status.

All WordPress user side of e-mails should send from [email protected]. Example: Forget password e-mail, account creation e-mail.

Note: All methods are working. I just want to send different e-mails from their respective purpose.

What I need is :

I need to send transactional e-mails from two SMTP configurations.

All WooCommerce side of e-mails should send from [email protected]. Example: order summary, delivery status.

All WordPress user side of e-mails should send from [email protected]. Example: Forget password e-mail, account creation e-mail.

Note: All methods are working. I just want to send different e-mails from their respective purpose.

Share Improve this question edited Jul 3, 2019 at 1:07 user3135691 1,0359 silver badges15 bronze badges asked Jul 1, 2019 at 14:56 VarunaVaruna 133 bronze badges 2
  • Are you really sending from two different domains i.e maydomain and mydomain? If it’s a typo you should update your question title, because you’re not trying to configure two SMTP servers, but rather two From addresses which is a lot simpler – Andy Commented Jul 2, 2019 at 19:41
  • @Andy that was a typo. Sorry about that. But this not about from addresses. Same domain but I have two SMTP servers (main smtp server and marketing smtp server. Marketing smtp server is optimized send bulk emails) – Varuna Commented Jul 5, 2019 at 10:08
Add a comment  | 

1 Answer 1

Reset to default 1

Disclaimer: this is clumsy, someone might have a better suggestion. But here's one idea:

  1. Leave WordPress configured with your [email protected] settings.
  2. Set up Woo with the [email protected] address (WooCommerce -> Settings -> Emails -> From Address).
  3. Hook woocommerce_mail_callback with your own function that temporarily hooks phpmailer_init to change the SMTP configuration before calling wp_mail.

Or perhaps you can skip step 3 if your SMTP server can be configured to allow an alternate "from" address for authenticated users.

And just a heads up: WooCommerce supplies its own forgot password and new account emails, so you'd need to decide whether you want to return those to their WordPress defaults, or just change them as well in step 3.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745350231a4623789.html

相关推荐

  • plugins - How to configure two SMTP Server for wordpress

    What I need is : I need to send transactional e-mails from two SMTP configurations.All WooCommerce side of e-mails shoul

    6小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信