I want to send an email with a japanese characters in subject using PHP. I can send by using jap characters in sender but when I use it in subject email does not receive. How can I fix this problem. Please help.
Thanks, Gyp
I want to send an email with a japanese characters in subject using PHP. I can send by using jap characters in sender but when I use it in subject email does not receive. How can I fix this problem. Please help.
Thanks, Gyp
Use PHPmailer library, I have never had problem with UTF8 characters while I use that. http://phpmailer.worxware.com/
First result of google (for "php unicode email")
Here's the code:
$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);