Is it possible to change the envelope sender used by wp_mail
?
So far I have tried setting headers
, and the wp_mail_from
and wp_mail_from_name
filters.
2 Answers
Yes. You can. There is several filters what you mentioned in your question. You can do it with WP Mail SMTP plugin. This plugin have multiple settings such as: Sender Name, Sender Email. To get it to set the envelope sender as well, you have to turn on the “Return Path” option. This stuff working with using filters which you’ve mentioned.
You can also setup an external SMTP server which should be using to send all emails in WordPress.