Strange characters in message subject, using wp_mail

1

Good evening, I would like someone to help me with this, I developed a plugin wordpress, send emails perfectly, but when the subject contains accentuation, the subject is displayed in a strange way, see ...

The subject arrives this way ... = ?? Q? = C3 = 89_something_a_test.? =

Does anyone have any idea what it is ?? This is the code I'm using to send emails ...

/// to
$to = $args['send_to'];
/// message
$that_message = self::preg_parse($msg['mp_message'], $args);
/// subject
$subject = "É somente um teste.";
/// headers
$headers = array('Content-type: text/html;');

wp_mail($to, $subject, $that_message, $headers);
    
asked by anonymous 26.05.2015 / 06:38

1 answer

1

You can pass the charset, telling you the type of encoding of your HTML, since you have enabled it by your headers like this:

$headers = array('Content-Type: text/html; charset=UTF-8');
    
26.05.2015 / 14:44