Ticket #39702: 39702.2.diff
File 39702.2.diff, 1.9 KB (added by , 8 years ago) |
---|
-
src/wp-includes/pluggable.php
308 308 } 309 309 310 310 // Empty out the values that may be set 311 $phpmailer-> ClearAllRecipients();312 $phpmailer-> ClearAttachments();313 $phpmailer-> ClearCustomHeaders();314 $phpmailer-> ClearReplyTos();311 $phpmailer->clearAllRecipients(); 312 $phpmailer->clearAttachments(); 313 $phpmailer->clearCustomHeaders(); 314 $phpmailer->clearReplyTos(); 315 315 316 316 // From email and name 317 317 // If we don't have a name from the input headers … … 410 410 } 411 411 412 412 // Set to use PHP's mail() 413 $phpmailer-> IsMail();413 $phpmailer->isMail(); 414 414 415 415 // Set Content-Type and charset 416 416 // If we don't have a content-type from the input headers … … 430 430 431 431 // Set whether it's plaintext, depending on $content_type 432 432 if ( 'text/html' == $content_type ) 433 $phpmailer-> IsHTML( true );433 $phpmailer->isHTML( true ); 434 434 435 435 // If we don't have a charset from the input headers 436 436 if ( !isset( $charset ) ) … … 450 450 // Set custom headers 451 451 if ( !empty( $headers ) ) { 452 452 foreach ( (array) $headers as $name => $content ) { 453 $phpmailer-> AddCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) );453 $phpmailer->addCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) ); 454 454 } 455 455 456 456 if ( false !== stripos( $content_type, 'multipart' ) && ! empty($boundary) ) 457 $phpmailer-> AddCustomHeader( sprintf( "Content-Type: %s;\n\t boundary=\"%s\"", $content_type, $boundary ) );457 $phpmailer->addCustomHeader( sprintf( "Content-Type: %s;\n\t boundary=\"%s\"", $content_type, $boundary ) ); 458 458 } 459 459 460 460 if ( !empty( $attachments ) ) { 461 461 foreach ( $attachments as $attachment ) { 462 462 try { 463 $phpmailer-> AddAttachment($attachment);463 $phpmailer->addAttachment($attachment); 464 464 } catch ( phpmailerException $e ) { 465 465 continue; 466 466 }