From 7e298b0ceb97f7572d8c872c48a40dcfeda4121a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 1 Apr 2017 14:33:59 +0000 Subject: [PATCH] Mail: Use correct capitalization for PHPMailer methods in `wp_mail()`. Props Soean, reidbusi. Fixes #39702. git-svn-id: https://develop.svn.wordpress.org/trunk@40363 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/pluggable.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index 0ed2609d40..3058986ab6 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -308,10 +308,10 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() } // Empty out the values that may be set - $phpmailer->ClearAllRecipients(); - $phpmailer->ClearAttachments(); - $phpmailer->ClearCustomHeaders(); - $phpmailer->ClearReplyTos(); + $phpmailer->clearAllRecipients(); + $phpmailer->clearAttachments(); + $phpmailer->clearCustomHeaders(); + $phpmailer->clearReplyTos(); // From email and name // If we don't have a name from the input headers @@ -410,7 +410,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() } // Set to use PHP's mail() - $phpmailer->IsMail(); + $phpmailer->isMail(); // Set Content-Type and charset // If we don't have a content-type from the input headers @@ -430,7 +430,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() // Set whether it's plaintext, depending on $content_type if ( 'text/html' == $content_type ) - $phpmailer->IsHTML( true ); + $phpmailer->isHTML( true ); // If we don't have a charset from the input headers if ( !isset( $charset ) ) @@ -450,17 +450,17 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() // Set custom headers if ( !empty( $headers ) ) { foreach ( (array) $headers as $name => $content ) { - $phpmailer->AddCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) ); + $phpmailer->addCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) ); } if ( false !== stripos( $content_type, 'multipart' ) && ! empty($boundary) ) - $phpmailer->AddCustomHeader( sprintf( "Content-Type: %s;\n\t boundary=\"%s\"", $content_type, $boundary ) ); + $phpmailer->addCustomHeader( sprintf( "Content-Type: %s;\n\t boundary=\"%s\"", $content_type, $boundary ) ); } if ( !empty( $attachments ) ) { foreach ( $attachments as $attachment ) { try { - $phpmailer->AddAttachment($attachment); + $phpmailer->addAttachment($attachment); } catch ( phpmailerException $e ) { continue; }