[wp-trac] [WordPress Trac] #19549: Please remove X-Mailer from class-phpmailer

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 26 23:07:48 UTC 2011


#19549: Please remove X-Mailer from class-phpmailer
--------------------------+------------------------------
 Reporter:  jwz           |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Mail          |     Version:  3.3
 Severity:  minor         |  Resolution:
 Keywords:  2nd-opinion   |
--------------------------+------------------------------

Comment (by jwz):

 Replying to [comment:3 dd32]:

 The `wp_mail` filter doesn't help, since that only lets me alter the
 arguments that WordPress passed in.

 The `phpmailer_init` action does not let me alter the raw message produced
 by PHPMailer; it only lets me set some values in the `$phpmailer` object.

 I guess I could just do `$phpmailer->Version = "0.0.0"` in that action to
 obfuscate it, but it doesn't let me do what I actually want to do:
 completely omit the "X-Mailer" and "X-Priority" headers.

 If there was a hook inside of `Send()` that let me alter `$header` before
 `SendmailSend`, `SmtpSend` or `MailSend` were called, that would let me do
 what I want.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19549#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list