0

I want to send mails using wp_mail function. I have multiple SMTP accounts login details. I want to send some mail using Account A and some using Account B. How can I send mails with different accounts? I saw phpmailer_init but it cannot be changed once set.

2
  • phpmailer_init will fire just before a message is sent, every time. You'll be fine to use that hook & change your SMTP settings on-the-fly, depending on whatever conditions. Jun 3, 2014 at 10:34
  • @TheDeadMedic Thanks! it worked for me. I thought it is one timer and cannot be changed
    – user35560
    Jul 3, 2014 at 12:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.