| Hey All I am having a problem with a PHP form handler and formatting it to send an auto reply to the user in Japanese Text. Apologies if this is a bit word heavy - I am fairly new to PHP and this forum. Here is a description of what the file is doing at the moment: The file gets user name, email, phone, fax and comments that are entered into a form within a Flash Website. The Flash Website sends the form data to the PHP file as UTF-8 formatted text. (This information can be entered as English or Japanese text). The file then sends these details as an email to the site website administrator, maintaining the UTF-8 character encoding for any content that was entered in Japanese. It also sends an auto reply email to the user, confirming that their information has been received and they will be added to the mailing and contact list. Here is a description of what I need the file to do: The PHP file is handling the content (both English and Japanese text) that is receives from the Flash Website fine. However, what I need to do is send the auto reply confirmation email to the user in UTF-8 format, which allows the confirmation message to be in Japanese. I am using the mb_send_mail function to send the emails from the PHP script - one email to the website administrator and one email to the user. I have also tried using the utf-8_decode and the utf-8_encode functions to to convert the email text to UTF-8 format before it is sent, but so far have had no success. As I mentioned above, the PHP script has no problems handling the UTF-8 text that it pulls in from Flash. I am just having an issue creating and sending Japanese text UTF-8 encoded emails from the PHP script, and no knowing exactly where to put the string to encode the text. I am hoping that it is simple to fix, but my PHP skills are very limited. Any help would be greatly appreciated. Here is the code with just dummy Japanese text inserted. <? $adminaddress = "[EMAIL PROTECTED]"; $siteaddress ="http://www.theviciouscycle.com.au"; $sitename = "The Vicious Cycle"; $date = date("m/d/Y H:i:s"); // Gets the IP Address if ($REMOTE_ADDR == "") $ip = "no ip"; else $ip = getHostByAddr($REMOTE_ADDR); // Gets the POST Headers - the Flash variables $action = "" ; $email = $HTTP_POST_VARS['email'] ; $name = $HTTP_POST_VARS['name'] ; $phone = $HTTP_POST_VARS['phone'] ; $fax = $HTTP_POST_VARS['fax'] ; $comments = $HTTP_POST_VARS['comments'] ; //Process the form data! // and send the information collected in the Flash form to the nominated email address mb_language('Neutral') ; mb_internal_encoding("UTF-8") ; mb_http_input("UTF-8") ; mb_http_output("UTF-8") ; mb_send_mail("$adminaddress", " ホワイトゴールドネックレスK18 ダイヤモンド エナメル from Italy", "ホワイトゴールドネックレスK18 ダイヤモンド エナメル\n Name: $name Email: $email\n Phone: $phone Fax: $fax ホワイトゴールドネックレスK18 ダイヤモンド エナメル ------------------------------ $comments,"FROM:$adminaddress") ; //This sends a confirmation to the visitor mb_send_mail("$adminaddress", " ホワイトゴールドネックレスK18 ダイヤモンド エナメル", "ホワイトゴールドネックレスK18 ダイヤモンド エナメル\n Name: $name Email: $email\n Phone: $phone Fax: $fax ホワイトゴールドネックレスK18 ダイヤモンド エナメル ------------------------------ $comments,"FROM:$adminaddress") ; ?> |
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
