Re: Cc / Bcc don't work on win2k but on linux???
| From: | Stuart Dallas | Date: | Fri, 21 Jun 2002 14:24:39 +0000 |
| Subject: | Re: Cc / Bcc don't work on win2k but on linux??? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-103278@lists.php.net to get a copy of this message | ||
On Friday, June 21, 2002, 3:14:17 PM, you wrote:
> i am facing the above issue. i set the headers up for the mail(). tried
> submitting the email. it worked great on linux server. but when i try to
> run it on a win2k. i just get:
> Warning: Server Error in blahblah.php on line blahblah
> my piece of code:
> $headers = "MIME-Version: 1.0\r\n";
> $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
> $headers .= "From: lornie@magix.com.sg\r\n";
> $headers .= "Cc: lornie@magix.com.sg\r\n";
> $to = "lornie@magix.com.sg";
> $subject = "my subject";
> $message = "my message";
> mail($to, $subject, $message, $headers);
> any idea whats wrong with the above code?
> the log file shows:
> #Fields: time c-ip cs-method cs-uri-stem sc-status
> 12:23:30 127.0.0.1 HELO - 250
> 12:23:30 127.0.0.1 MAIL - 250
> 12:23:30 127.0.0.1 RCPT - 250
> 12:23:30 127.0.0.1 RCPT - 501
> 12:23:30 127.0.0.1 QUIT - 0
> it appears that 501 = Not Implemented on IIS5. but i am not sure on that.
That 501 is an SMTP error code, not an IIS error. A 501 error in SMTP
means "Syntax error in parameters or arguments". Looking at your code, the only
thing I can think is that it's complaining because both addresses are the same.
Try changing the CC address to something different from the primary recipient.
--
Stuart