我想使用PHP在主題中使用日語字符發送電子郵件。 我可以通過在發件人中使用jap字符發送,但是當我在主題 中使用它時,電子郵件不會收到。 我該如何解決這個問題。請幫忙。PHP unicode電子郵件
感謝, 絞股藍皁苷
我想使用PHP在主題中使用日語字符發送電子郵件。 我可以通過在發件人中使用jap字符發送,但是當我在主題 中使用它時,電子郵件不會收到。 我該如何解決這個問題。請幫忙。PHP unicode電子郵件
感謝, 絞股藍皁苷
(對於 「PHP的unicode電子郵件」)
這裏First result of google的代碼:
$headers['To'] = $to;
$headers['From'] = $from;
$headers['Content-Type'] = "text/plain; charset=utf-8";
$headers['Content-Transfer-Encoding'] = "8bit";
$b64subject = "=?UTF-8?B?" . base64_encode($subject) . "?=";
$headers['Subject'] = $b64subject;
$mail = Mail::factory('sendmail', array('host' => $host, 'port'=>$port));
$retval = $mail->send($to, $headers, $body);
使用PHPMailer的圖書館,我從未有過的UTF8字符的問題,而我使用它。 http://phpmailer.worxware.com/
顯示一些代碼... – Daniel 2012-07-07 16:15:30
看似http://stackoverflow.com/questions/4389676/php-email-header-subject-encoding-problem – abelito 2012-07-07 16:16:50
的副本,你試過'函數utf8_encode()',或者'mail_utf8()'? – 2012-07-07 17:41:26