Created
April 29, 2020 15:57
-
-
Save vfontjr/0ca1b51d9ee0045f61f297a16324dbea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'wp_mail_content_type', 'set_content_type' ); | |
function set_content_type( $content_type ) { | |
return 'text/x-gm-impdata'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('frm_pre_create_entry', 'adjust_my_email_header'); | |
function adjust_my_email_header($values){ | |
if ( $values['form_key'] == 'contact2' ) { | |
add_filter('frm_email_header', 'change_email_content_type'); | |
} | |
return $values; | |
} | |
function change_email_content_type($header) { | |
/* remove the Content Type element of the array */ | |
array_pop($header); | |
/* needed to preserve compatibility */ | |
$charset = get_option('blog_charset'); | |
$content_type = 'Content-Type: text/x-gm-impdata; charset="' . esc_attr( $charset ) . '"'; | |
$header[] = $content_type; | |
return $header; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('frm_email_header', 'change_formidable_email_content_type'); | |
function change_formidable_email_content_type($header) { | |
/* remove the Content Type element of the array (the last element) */ | |
array_pop($header); | |
/* needed to preserve compatibility */ | |
$charset = get_option('blog_charset'); | |
$content_type = 'Content-Type: text/x-gm-impdata; charset="' . esc_attr( $charset ) . '"'; | |
$header[] = $content_type; | |
return $header; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment