Skip to content

Commit

Permalink
fix for wpmudev host
Browse files Browse the repository at this point in the history
removes the MIME-Version from headers as the mails are not getting delivered.

There's no need for a MIME-Version as far as I know as wp_mail() already handles that.

Ref ticket with the whole chat: https://app.asana.com/0/981757582991179/982996521457395/f
  • Loading branch information
mrxkon committed Jan 16, 2019
1 parent a2d108a commit 7900c12
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions appointments.php
Expand Up @@ -2057,11 +2057,9 @@ function message_headers() {
$blogname = strip_tags( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) );
$content_type = apply_filters( 'app-emails-content_type', 'text/plain' );
if ( ! (defined( 'APP_EMAIL_DROP_LEGACY_HEADERS' ) && APP_EMAIL_DROP_LEGACY_HEADERS) ) {
$message_headers = "MIME-Version: 1.0\n" . "From: {$blogname}" . " <{$admin_email}>\n" . "Content-Type: {$content_type}; charset=\"" . get_option( 'blog_charset' ) . "\"\n";
$message_headers = "From: {$blogname}" . " <{$admin_email}>\n" . "Content-Type: {$content_type}; charset=\"" . get_option( 'blog_charset' ) . "\"\n";
} else {
$message_headers = "MIME-Version: 1.0\n" .
"Content-Type: {$content_type}; charset=\"" . get_option( 'blog_charset' ) . "\"\n"
;
$message_headers = "Content-Type: {$content_type}; charset=\"" . get_option( 'blog_charset' ) . "\"\n";
add_filter( 'wp_mail_from', create_function( '', "return '{$admin_email}';" ) );
add_filter( 'wp_mail_from_name', create_function( '', "return '{$blogname}';" ) );
}
Expand Down

0 comments on commit 7900c12

Please sign in to comment.