如何将其他参数传递给WordPress wp_mail()函数?

I want to pass some additional data (i.e. the admin email address) every a mail is sent from WordPress.

If my web site was based on pure PHP, I would have to set parameter additional_parameters to -f me@domain.com. More info here.

However, my web site is based on WordPress and so I have to find another way to pass the additional parameter (i.e. the admin email address) to wp_mail() function.

How can I do that in Wordpress?

wp_mail allows you to provide headers to the email. If you use the From header, you can specify who the email is from.

$headers = array('From: ' . get_option('admin_email'));

wp_mail('recipient@example.com', 'Email subject', 'Email Body', $headers);