Jump to content

UTF-8 no subject do phpmailer


Recommended Posts

Oi pessoal,

ando a desenvolver código para enviar email com o phpmailer em que a mensagem tem de ter a codificação UTF-8 (para texto em russo).

$mail = new PHPMailer();	
$mail->Host     = $smtp_server; // SMTP server
$mail->CharSet = 'UTF8';

$mail->From     = $admin_email;
$mail->FromName = $admin_name;

$mail->Subject  = '$subject;
$mail->Body     = $body;


o problema é que o assunto ($mail->Subject) não aceita caracteres em UTF-8, ao contrario do que acontece no body em que aparece tudo bem.

Alguém tem alguma sugestão?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.