Hi Julian,
I’m sorry for the late reply. Still having the same issue.
Where can I find the “Hide header” option?
The email that triggers the problem is an email template created inside a custom plugin. As mentioned, the email has these lines of code in the email template:
<!--[if gte mso 9]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
While this is the code for sending the email:
public function sendThisEmail($token, $product) {
$currentUserId = get_current_user_id();
$user = wp_get_current_user();
$user_name = $user->data->display_name;
$email = $user->data->user_email;
$logo = "logo/link";
$subject = "This is a subject" ;
$headers = array('Content-Type: text/html; charset=UTF-8');
$message = MailHelper::prepareEmail(
CUSTOM_PLUGIN . '/views/wp-html-mail/email-template',
array(
'logo' => $logo,
'email' => $email,
'user_name' => $user_name,
)
);
wp_mail( $email, $subject, $message, $headers );
}
public static function prepareEmail( $template, $params = array() )
{
if ( !empty( $params ) && is_array( $params ) ) {
extract( $params );
}
ob_start();
require( $template );
$result = ob_get_contents();
ob_end_clean();
return $result;
}
Many thanks,
Hannah