[PHP] PHP mail() problem
Hi, I'm having problem with character encoding in PHP mail functions. CODE: $headers.= Content-Type: text/html; charset=iso-8859-1; $headers .= MIME-Version: 1.0 ; $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol; $headers .=Content-Type: multipart/alternative; boundary=0-92766976-1174383938=:29106; $to = [EMAIL PROTECTED]; $subject = $_POST['cat']; $body = $_POST['text']; if (mail($to, $subject, $body, $headers)) { echo('pMessage successfully sent!/pbr /a href=showarticle.php?cid=5id=3Povratak/a'); } else { echo('pMessage delivery failed.../pbr /a href=showarticle.php?cid=5id=3Povratak/a'); } Im receiving mail as you see using yahoo.com. It all works except it doesn't show croatian letters... I also tried with encoding utf-8, same thing... ČĆŽŠĐ Please help, thank you very much! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail() problem
2007. 03. 20, kedd keltezéssel 10.54-kor Delta Storm ezt írta: Hi, I'm having problem with character encoding in PHP mail functions. CODE: $headers.= Content-Type: text/html; charset=iso-8859-1; $headers .= MIME-Version: 1.0 ; $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol; $headers .=Content-Type: multipart/alternative; boundary=0-92766976-1174383938=:29106; $to = [EMAIL PROTECTED]; $subject = $_POST['cat']; $body = $_POST['text']; you should check those values first before putting them into mail(). they can contain spammer tricks like putting newlines in the subject and then cc header lines or something similar if (mail($to, $subject, $body, $headers)) { echo('pMessage successfully sent!/pbr /a href=showarticle.php?cid=5id=3Povratak/a'); } else { echo('pMessage delivery failed.../pbr /a href=showarticle.php?cid=5id=3Povratak/a'); } Im receiving mail as you see using yahoo.com. It all works except it doesn't show croatian letters... I also tried with encoding utf-8, same thing... ČĆŽŠĐ what is the charset of the webpage displaying the form which triggers this function? it must be set to the same value as the email otherwise your email sending function won't receive the croatian letters at all, so it cannot send them too... hope that helps Zoltán Németh Please help, thank you very much! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail() problem
Hi. Recently I have this kind of issue. This is a possible solution: $text=message text; $subject=message subject; $header=From: [EMAIL PROTECTED]. MIME-Version: 1.0\r\n. Content-type: text/html; charset=utf-8\r\n. Content-Transfer-Encoding: 8bit\r\n; $subject2=utf8_encode($subject); $text2=utf8_encode($text); mail([EMAIL PROTECTED],$subject,$text2,$header); This encodes message to UTF-8 and should work. 2007. március 20. 10.54 dátummal Delta Storm ezt írta: Hi, I'm having problem with character encoding in PHP mail functions. CODE: $headers.= Content-Type: text/html; charset=iso-8859-1; $headers .= MIME-Version: 1.0 ; $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol; $headers .=Content-Type: multipart/alternative; boundary=0-92766976-1174383938=:29106; $to = [EMAIL PROTECTED]; $subject = $_POST['cat']; $body = $_POST['text']; if (mail($to, $subject, $body, $headers)) { echo('pMessage successfully sent!/pbr /a href=showarticle.php?cid=5id=3Povratak/a'); } else { echo('pMessage delivery failed.../pbr /a href=showarticle.php?cid=5id=3Povratak/a'); } Im receiving mail as you see using yahoo.com. It all works except it doesn't show croatian letters... I also tried with encoding utf-8, same thing... ČĆŽŠĐ Please help, thank you very much! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP mail() problem
On Tue, March 20, 2007 4:54 am, Delta Storm wrote: Disclosure: What I understand of Unicode could fit in a matchbook... I'm having problem with character encoding in PHP mail functions. CODE: $headers.= Content-Type: text/html; charset=iso-8859-1; $headers .= MIME-Version: 1.0 ; $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol; WILD GUESS ALERT!!! You're trying to pass 16-bit characters in an 8bit transfer encoding, whatever the heck that is... Seems to me you need a bigger bucket... You do realize that sending HTML Enhanced (cough, cough) email is quite likely to get it marked as spam and never seen by the intended recipient, right?... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Mail problem
Hi, I am doing email blast program. I wanted to blast 100 emails. For testing purpose (I wanted to test how much time it takes), I blasted all 100 to my account (That too twice) I received almost 100 over mails, but later on received - quota over - error. Now the problem is I can not get a single mail. I tried to test out with sending out just one email, I also tried using other account, but now not getting anything. What can be the problem and what shall I do now ? Is it that I have hang up email server ? Thanks in advance, Manisha -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Mail() Problem
When I send an email using mail() I can the emails from nobody (using outlook) and in some programs like AOL from Unknown and in Web Based Emails like Yahoo I get it Correct and in Outlook Express also correct How can I fix this problem ? After some tests I found out Nobody nobody@servername on behalf of myemail appears in Outlook Unknown@unknownserver appears in AOL My email appears correctly in Hotmail Yahoo Outlook Express and some others Web Based Clients .. The headers I rec. is : Return-Path: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Test for Mail Function from AOL From: [EMAIL PROTECTED] Message-Id: [EMAIL PROTECTED] Sender: Nobody [EMAIL PROTECTED] Date: Tue, 14 Aug 2001 20:49:48 -0400 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host14.hrwebservices.net X-AntiAbuse: Original Domain - abkareno.com X-AntiAbuse: Originator/Caller UID/GID - [99 99] / [99 99] X-AntiAbuse: Sender Address Domain - host14.hrwebservices.net How can I fix this problem ?