[wp-trac] [WordPress Trac] #19549: Please remove X-Mailer from class-phpmailer
WordPress Trac
wp-trac at lists.automattic.com
Wed Jan 4 09:51:21 UTC 2012
#19549: Please remove X-Mailer from class-phpmailer
-----------------------------------+-----------------------
Reporter: jwz | Owner: westi
Type: enhancement | Status: assigned
Priority: normal | Milestone: 3.4
Component: External Libraries | Version: 3.3
Severity: minor | Resolution:
Keywords: 2nd-opinion has-patch |
-----------------------------------+-----------------------
Comment (by MattyRob):
Replying to [comment:12 jwz]:
> Currently, I can remove WordPress version-branding in HTML and RSS by
doing:
> {{{
> function no_generator() { return ''; }
> add_filter('the_generator', 'no_generator');
> }}}
>
> Wouldn't it be better for php-mailer to be calling `the_generator()` so
that all this comes from the same place?
The current 'the_generator' filter echos the returned string so that would
not help in the case of PHPMailer. Also, these filters ultimately link
through to the [http://core.trac.wordpress.org/browser/tags/3.3.1/wp-
includes/general-template.php#L2160 get_the_generator() function] and this
function returns more than just the word WordPress with the version number
appended.
The fix I attached for wp_mail() allows X-Priority and X-Mailer to be over
written but currently the PHPMailer library will not accept null input for
these variables (I don't think).
Of course we can fork the PHPMailer code but then there is little point of
using an external library to then make custom changes to it so you have to
merge in changes every time it gets updated rather than simply updating
the entire file.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19549#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list