RE: [PHP] mail function????
| From: | Matt Williams | Date: | Thu, 12 Apr 2001 08:36:25 +0000 |
| Subject: | RE: [PHP] mail function???? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-48268@lists.php.net to get a copy of this message | ||
> Hi,
> I have PHP 4.0 with IIS on Win2K and I think compiled
> everything right.
> I'm not sure how this works on Win32, but on unix it's fine. It's
> the mail()
> function.
> ex. mail("someone@somewhere.com","My Subject","My Test");
> and it returns: Warning: Server Error in C:\PHP/index.php on line 4
Hi
Firstly, you need to add your smtp server in php.ini under the [mail
function] heading
ie.
SMTP = smtp.mydomain.com
and secondly your connection to this needs to be open.
I've had php report errors before depending on whether the mail server likes
\r or \n or neither.
But if you're just sending the one liner like above this obviously rules
that out.
HTH
M@