Plugin Support
Julian
(@juliangk)
Hello @hnnhtabunan,
If you are using WPForms, please turn on the “Hide header “option. You can also deactivate “Use template”.
Best regards
Julian
Hello @juliangk, thanks for the quick reply.
I am not using WPForms but here the plugins I am using that might have affected the email.
- Contact Form 7
- WooCommerce
I’m also using the Divi theme.
Many thanks,
Hannah
Plugin Support
Julian
(@juliangk)
Hello Hannah,
you can use the same options for any supported plugins.
Please describe in detail which e-mail triggers the problem when it is send, how it is triggered and which other plugins you use, that might interfere.
Thank you and best regards
Julian
Plugin Support
Julian
(@juliangk)
Hello Hannah,
does your issue still persist?
Best regards
Julian
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
Plugin Support
Julian
(@juliangk)
Hello Hanna,
“The email that triggers the problem is an email template created inside a custom plugin.”
What plugin are you using? If the plugin is not supported it will not work, but then you could use this filter, to deactivate our template for these specific emails.
You can fin the option for disabling header for support plugins under:
Settings -> Email template > Plugin emails (then click on plugin under Active plugins).
Best regards
Julian
Plugin Support
Julian
(@juliangk)
Hello Hanna,
do you still have troubles?
Best regards
Julian
Hey Julian,
Thank you very much! My issue is resolved by adding the filter you suggested. 🙂 I appreciate your help!
Many thanks,
Hannah
Plugin Support
Julian
(@juliangk)
I am happy it worked.
If you experience any further issues, let us know please.
Best regards
Julian