对于 HTML 电子邮件,
编辑:wp-content/plugins/contact-form-7/includes/classes.php
寻找function mail_callback
。在我的版本中,它位于第 631 行。
将函数编辑为:
function mail_callback( $matches, $html = false ) {
if ( isset( $this->posted_data[$matches[1]] ) ) {
$submitted = $this->posted_data[$matches[1]];
if ( $html ) {
$replaced = strip_tags( $replaced );
$replaced = wptexturize( $replaced );
}
if ( is_array( $submitted ) )
$replaced = join( '<br/>', $submitted );
else
$replaced = $submitted;
$replaced = apply_filters( 'wpcf7_mail_tag_replaced', $replaced, $submitted );
return stripslashes( $replaced );
}
if ( $special = apply_filters( 'wpcf7_special_mail_tags', '', $matches[1] ) )
return $special;
return $matches[0];
}