Make WordPress Core

Changeset 5762


Ignore:
Timestamp:
06/26/2007 06:28:56 PM (17 years ago)
Author:
markjaquith
Message:

compare mail headers case-insensitively and actually use the Content-Type specified. Props Nazgul. see: #4296

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r5761 r5762  
    194194
    195195                // Mainly for legacy -- process a From: header if it's there
    196                 if ( $name == 'From' ) {
     196                if ( 'from' == strtolower($name) ) {
    197197                    if ( strpos($content, '<' ) !== false ) {
    198198                        // So... making my life hard again?
     
    207207                        $from_name = trim( $content );
    208208                    }
    209                 } elseif ( $name == 'Content-Type' ) {
     209                } elseif ( 'content-type' == strtolower($name) ) {
    210210                    if ( strpos( $content,';' ) !== false ) {
    211211                        list( $type, $charset ) = explode( ';', $content );
     
    282282
    283283    // 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 );
    285285    $phpmailer->CharSet = apply_filters( 'wp_mail_charset', $charset );
    286286
Note: See TracChangeset for help on using the changeset viewer.