[wp-trac] [WordPress Trac] #2795: Improved Mail Headers

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 7 09:15:12 GMT 2006


#2795: Improved Mail Headers
-----------------------+----------------------------------------------------
       Id:  2795       |      Status:  new                     
Component:  General    |    Modified:  Wed Jun  7 09:15:12 2006
 Severity:  trivial    |   Milestone:  2.0.4                   
 Priority:  low        |     Version:  2.0.2                   
    Owner:  anonymous  |    Reporter:  mattyrob                
-----------------------+----------------------------------------------------
 I have written a plugin that I use on my site to improve the mail headers
 used by WordPress in the pluggable functions. Perhaps these changes could
 be added to the original code.

 {{{
 if ( !function_exists('wp_mail') ) :
 function wp_mail($to, $subject, $message, $headers = '') {
         if( $headers == '' ) {
                 $admin = get_userdata('1');
                 $headers = "MIME-Version: 1.0\n" .
                         "From: " .  $admin->display_name . " <" .
 $admin->user_email . ">\n" .
                         "Return-Path: <" . $admin->user_email .">\n" .
                         "Precedence: list\nList-Id: " .
 get_settings('blogname') . "\n" .
                         "Content-Type: text/plain; charset=\"" .
 get_settings('blog_charset') . "\"\n";
         }
         return @mail($to, $subject, $message, $headers);
 }
 endif;
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2795>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list