Is there any way I can make WordPress use more than one outgoing email service, and have all emails from a particular plug-in (such as WooCommerce, for example) use one system, and everything else on the site (including core notifications, etc.) use the other system?
Put another way … What I’d like to achieve is this:
-
Define a second email service. It will be using an SMTP server. Then set up a filter of some kind that will reroute emails from a given source (WooCommerce, in this instance) through that secondary service?
-
All other emails generated by WordPress (and all other plug-ins) would go through the regular route (as per the regular wp_mail function).
The Why
In case you’re interested … my reasoning for this is that I’ve found that when sending non-transactional emails (such as promos, abandoned cart emails, etc.) through the same SMTP service as all the transactional emails, it can negatively impact the deliverability of the transactional emails. They become more likely to end up in spam, or in the Gmail "Promotional" folder, or not delivered at all. So I’d like to be able to send transactional emails via one SMTP service (with its associated IP address), and all non-transactional emails via another SMTP service (with a different IP address).