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:
parent
39c77f5f3a
commit
7e298b0ceb
@ -308,10 +308,10 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Empty out the values that may be set
|
// Empty out the values that may be set
|
||||||
$phpmailer->ClearAllRecipients();
|
$phpmailer->clearAllRecipients();
|
||||||
$phpmailer->ClearAttachments();
|
$phpmailer->clearAttachments();
|
||||||
$phpmailer->ClearCustomHeaders();
|
$phpmailer->clearCustomHeaders();
|
||||||
$phpmailer->ClearReplyTos();
|
$phpmailer->clearReplyTos();
|
||||||
|
|
||||||
// From email and name
|
// From email and name
|
||||||
// If we don't have a name from the input headers
|
// 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()
|
// Set to use PHP's mail()
|
||||||
$phpmailer->IsMail();
|
$phpmailer->isMail();
|
||||||
|
|
||||||
// Set Content-Type and charset
|
// Set Content-Type and charset
|
||||||
// If we don't have a content-type from the input headers
|
// 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
|
// Set whether it's plaintext, depending on $content_type
|
||||||
if ( 'text/html' == $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 we don't have a charset from the input headers
|
||||||
if ( !isset( $charset ) )
|
if ( !isset( $charset ) )
|
||||||
@ -450,17 +450,17 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
|
|||||||
// Set custom headers
|
// Set custom headers
|
||||||
if ( !empty( $headers ) ) {
|
if ( !empty( $headers ) ) {
|
||||||
foreach ( (array) $headers as $name => $content ) {
|
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) )
|
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 ) ) {
|
if ( !empty( $attachments ) ) {
|
||||||
foreach ( $attachments as $attachment ) {
|
foreach ( $attachments as $attachment ) {
|
||||||
try {
|
try {
|
||||||
$phpmailer->AddAttachment($attachment);
|
$phpmailer->addAttachment($attachment);
|
||||||
} catch ( phpmailerException $e ) {
|
} catch ( phpmailerException $e ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user