我正在使用 phpmailer 通过电子邮件向自己发送通知。
电子邮件采用 html 格式,正文包含希伯来语字符。
在我的 Mac 上,电子邮件看起来不错,但在 iphone 上却显示为乱码。
我尝试了所有可能的编码头组合在 html 头标签上和作为 phpmailer 的属性,但没有运气。
有任何想法吗?
谢谢
我如何格式化代码?
require("./classes/phpmailer/class.phpmailer.php");
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->Host = 'ssl://smtp.gmail.com:465';
$mailer->SMTPAuth = TRUE;
$mailer->Username = 'bla@gmail.com'; // Change this to your gmail adress
$mailer->Password = '1234'; // Change this to your gmail password
$mailer->From = 'joe@gmail.com'; // This HAVE TO be your gmail adress
$mailer->FromName = 'Mail'; // This is the from name in the email, you can put anything you like here
$mailer->IsHTML(true);
$mailer->Body = $message;
$mailer->Subject = $subject;
$mailer->AddAddress('me@gmail.com'); // This is where you put the email adress of the person you want to mail
if ($mailer->Send()) echo "ok";
else echo "no ok";