Changeset 46115 for trunk/src/wp-includes/pluggable.php
- Timestamp:
- 09/14/2019 08:13:37 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r45971 r46115 451 451 $phpmailer->CharSet = apply_filters( 'wp_mail_charset', $charset ); 452 452 453 // Set custom headers 453 // Set custom headers. 454 454 if ( ! empty( $headers ) ) { 455 455 foreach ( (array) $headers as $name => $content ) { 456 $phpmailer->addCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) ); 456 // Only add custom headers not added automatically by PHPMailer. 457 if ( ! in_array( $name, array( 'MIME-Version', 'X-Mailer') ) ) { 458 $phpmailer->addCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) ); 459 } 457 460 } 458 461
Note: See TracChangeset
for help on using the changeset viewer.