Re[2]: [PHP] Nonstandard SMTP line terminator
| From: | Ufuk M. Fakioglu | Date: | Thu, 19 Aug 2004 18:33:22 +0000 |
| Subject: | Re[2]: [PHP] Nonstandard SMTP line terminator | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194275@lists.php.net to get a copy of this message | ||
Here's the piece of code that composes and sends the e-mails:
$row=mysql_fetch_array($sql);
$name=$row[1];
$email=$row[2];
$subject=$_POST["subject"];
$msg=stripslashes($_POST["msg"]);
$msg=str_replace("RCPT_NAME", $name, $msg);
mail($email, $subject, $msg, "From: Mozaik <mozaik@umedis.net>\r\n".
"Return-Path: Mozaik <mozaik@umedis.net>\r\n".
"Content-type: text/html; charset=iso-8859-9\r\n");
Could it be the SQL query returning the "nonstandard terminator"?
How do I decide to use \n instead of \r\n?
Thanks,
Ufuk
JP> On Thu, 19 Aug 2004 19:33:11 +0300, Ufuk M. Fakioglu <ufuk@fakioglu.com> wrote:
>> Hi,
>>
>> I am using mail() with php 4.3.8 on FreeBSD 4.10 to send bulk mail.
>> Although I use \r\n in the header parameters, some mail servers
>> respond with "Nonstandard SMTP line terminator."
>>
>> What can I do?
>>
JP> If you send some code, perhaps we can help. Perhaps you should be
JP> using \n instead of \r\n? Or maybe anohter part of the message uses \n
JP> instead of \r\n?
JP> Otherwise, you can look into a different mailing system.
JP> http://pear.php.net/package/Mail
JP> http://pear.php.net/package/Mail_mime