[wp-hackers] header in email for filtering

Michael Leuchtenburg michael at slashhome.org
Mon Sep 13 16:58:15 UTC 2004


It would be nice to have a header in email on which to filter on. I 
propose the following two formats as possibilities:

X-Blog: Wordpress $wp_version: "$wp_blogname"
X-Blog: "$wp_blogname"

The first one is slightly more informative. The blog software info could 
also be put in a different header.

I've attached a patch against current CVS implementing the first format.

-- 
Michael Leuchtenburg  |  http://slashhome.org/
cell: 413.433.0739
-------------- next part --------------
Index: functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions.php,v
retrieving revision 1.159
diff -u -r1.159 functions.php
--- functions.php	10 Sep 2004 10:55:44 -0000	1.159
+++ functions.php	13 Sep 2004 16:58:24 -0000
@@ -985,7 +985,8 @@
 
 	$message_headers = "MIME-Version: 1.0\r\n"
 		. "$from\r\n"
-		. "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
+		. "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n"
+		. "X-Blog: Wordpress $wp_version: \"$blogname\"";
 
 	@mail($user->user_email, $subject, $notify_message, $message_headers);
    
@@ -1685,4 +1686,4 @@
     start_wp(true);
 }
 
-?>
\ No newline at end of file
+?>


More information about the hackers mailing list