php mailer char-coding problem
- by Holian
Hello!
I try to use Phpmailer to send registration, activation..etc mail to users...
 require("class.phpmailer.php");  
$mail -> charSet = "UTF-8";
$mail = new PHPMailer();  
$mail->IsSMTP();  
$mail->Host     = "smtp.mydomain.org";  
$mail->From     = "[email protected]";
$mail->SMTPAuth = true; 
$mail->Username ="username"; 
$mail->Password="passw"; 
//$mail->FromName = $header;
$mail->FromName = mb_convert_encoding($header, "UTF-8", "auto");
$mail->AddAddress($emladd);
$mail->AddAddress("[email protected]");
$mail->AddBCC('[email protected]', 'firstadd');
$mail->Subject  = $sub;
$mail->Body = $message;
$mail->WordWrap = 50;  
 if(!$mail->Send()) {  
   echo 'Message was not sent.';  
   echo 'Mailer error: ' . $mail->ErrorInfo;  
 }
The $message is contain latin characters. Unfortunatelly all webmail (gmail, webmail.mydomain.org, emailaddress.domain.xx) use different coding.
How can i force to use UTF-8 coding to show my mail exactly same on all mailbox?
I try to convert the mail header width mb_convert_encoding(), but with no luck. 
Thank you.