UTF8 encoding in email templates

Ticket for: User Verification
0
UTF8 encoding in email templates 1
UFOSend Technical
Apr 02, 2019 09:13 AM 2 Answers
Member Since Apr 2019
Subscribed Subscribe Not subscribe
Flag(0)

Dear Support,

We found that the charset of email template set for "User Verification" plugin is charset=ISO-8859-1

Is it possible to change to UTF8 so that we can display Chinese in emails?

Thanks.

2 Subscribers
UTF8 encoding in email templates 1
UTF8 encoding in email templates 3
Submit Answer
Please login to submit answer.
2 Answers
Sort By:
Best Answer
0
UTF8 encoding in email templates 4
PickPlugins
Apr 02, 2019
Flag(0)

Welcome to our forum.

Please do not modify plugin code, use the following code to solve your issue, you will need to add this code to your theme functions.php file

add_filter( 'wp_mail_charset', 'change_mail_charset' );
function change_mail_charset( $charset ) {
  return 'UTF-8';
}

Regards

Sign in to Reply
Replying as Submit
Best Answer
0
UTF8 encoding in email templates 5
UFOSend Technical
Apr 02, 2019
Flag(0)

Dear Support,

We fixed this problem by modifying line 731 of wp-content/plugins/user-verification/includes/functions.php as below:

$headers .= "Content-Type: text/html; charset=UTF-8\r\n";

But please provide a proper update solution as we cannot further receive plugin updates if directly modified the plugin code.

 

Thanks.

Sign in to Reply
Replying as Submit