Ticket #4296: 4296.diff
File 4296.diff, 1.2 KB (added by , 17 years ago) |
---|
-
wp-includes/pluggable.php
193 193 $content = trim( $content ); 194 194 195 195 // Mainly for legacy -- process a From: header if it's there 196 if ( $name == 'From') {196 if ( 'from' == strtolower( $name ) ) { 197 197 if ( strpos( '<', $content ) !== false ) { 198 198 // So... making my life hard again? 199 199 $from_name = substr( $content, 0, strpos( '<', $content ) - 1 ); … … 206 206 } else { 207 207 $from_name = trim( $content ); 208 208 } 209 } elseif ( $name == 'Content-Type') {209 } elseif ( 'content-type' == strtolower( $name ) ) { 210 210 if ( strpos( ';', $content ) !== false ) { 211 211 list( $type, $charset ) = explode( ';', $content ); 212 212 $content_type = trim( $content_type ); … … 281 281 } 282 282 283 283 // Set the content-type and charset 284 $phpmailer->ContentType = apply_filters( 'wp_mail_content_type', 'text/plain');284 $phpmailer->ContentType = apply_filters( 'wp_mail_content_type', $content_type ); 285 285 $phpmailer->CharSet = apply_filters( 'wp_mail_charset', $charset ); 286 286 287 287 // Set custom headers