From 58200c8ac8b6c7908ea066537c6153abf274b7af Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 18 Mar 2007 23:16:14 +0000 Subject: [PATCH] Add wp_mail_from filter. Props rob1n. fixes #2053 git-svn-id: https://develop.svn.wordpress.org/trunk@5061 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/pluggable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 848c9f0a99..0b796c2c45 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -170,7 +170,7 @@ function wp_mail($to, $subject, $message, $headers = '') { if ( $headers == '' ) { $headers = "MIME-Version: 1.0\n" . - "From: wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])) . "\n" . + "From: " . apply_filters('wp_mail_from', "wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']))) . "\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; }