When I use wp_mail( $to, $subject, $message, $headers ) (with values in place, of course), the email gets sent with a from name and email that isn't set anywhere I can find (not even in PHP or Apache settings). However, using mail( $to, $subject, $message, $headers ) instead works just fine. What could be happening with wp_mail() to cause this?
|
feedback
|
|
Hi @helenyhou: You can set the header, just not with a parameter. WordPress uses "hooks" and the hooks you need are Here are the hooks you might add to your theme's
| |||||||||||
feedback
|
|
Well, if you're using the However, as Mike said, you can filter the ultimate values with those filters, or you can just install this plugin: It'll give you an options setting to determine what name and email to use in wp_mail. | |||
|
feedback
|
|
Sorry to revive an old question but isn't it better to set via the headers like so:
That way you dont have to worry about using a filter and then removing at after wp_mail(). | |||||||||||
feedback
|