Problem with mail function
| From: | Sonya Davey / QDCEL | Date: | Mon, 26 Mar 2001 08:55:19 +0000 |
| Subject: | Problem with mail function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-45588@lists.php.net to get a copy of this message | ||
Hi, Can anyone help me the mail function.
I am using PHP 4.04, on Windows 98,with PWS.
1.What must I configure thse settings in my php.ini file to?
SMTP = localhost
sendmail_from = me@localhost.com
2.Why does this code give me the following error?
Warning: Failed to Connect
Code:
$to = 'support@here.co.za';
$from = 'sonyad@pqafrica.co.za';
$body = $MainAgentCode;
$headers = "From: $from";
$success = mail($to, "Inpro Web site", $body, $headers);
if ($success)
{//begin
echo "<B><CENTER>Thank you for your
input</CENTER></B>\n";
}//end
else{
echo "Error \n";
}
Thanks to anyone who can help.
Sonya