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
This commit is contained in:
Sergey Biryukov 2017-04-01 14:33:59 +00:00
parent 39c77f5f3a
commit 7e298b0ceb
1 changed files with 9 additions and 9 deletions

View File

@ -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;
}