note 29843 added to function.mb-send-mail

From: Date: Wed, 26 Feb 2003 17:29:01 +0000
Subject: note 29843 added to function.mb-send-mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-44561@lists.php.net to get a copy of this message
There is another way of encoding Japanese language to send email without worrying about mb_functions: Download PHP Jcode from http://www.spencernetwork.org/ and use JcodeConvert function with base64_encode function for the e-mail header and the subject. $email_to = "blah@blah.com"; $_POST["name"] = strip_tags(trim($_POST["name"])); $name = "=?ISO-2022-JP?B?". base64_encode(JcodeConvert($_POST["name"], 2, 3)). "?="; $_POST["email"] = strip_tags(trim($_POST["email"])); $_POST["subject"] = strip_tags(trim($_POST["subject"])); $email_subject = "=?ISO-2022-JP?B?". base64_encode(JcodeConvert($_POST["subject"], 2, 3)). "?="; $_POST["body"] = strip_tags(trim($_POST["body"])); $email_header = "From: $name <". $_POST["email"] .">\n"; $email_header .= "Reply-To: ". $_POST["email"] ."\n"; $email_header .= "Content-transfer-encoding: 7bit\n"; $email_header .= "Content-type: text/plain; charset=\"iso-2022-jp\"\n\n"; $email_body = "blah blah blah.\n" mail($email_to, $email_subject, $email_body, $email_header); -- http://www.php.net/manual/en/function.mb-send-mail.php http://master.php.net/manage/user-notes.php?action=edit+29843 http://master.php.net/manage/user-notes.php?action=delete+29843 http://master.php.net/manage/user-notes.php?action=reject+29843

« previous php.notes (#44561) next »