mail() function failure
| From: | Brad Esclavon | Date: | Thu, 07 Aug 2003 15:19:21 +0000 |
| Subject: | mail() function failure | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-158655@lists.php.net to get a copy of this message | ||
I have made a simple script to mail an email to a person on my domain. i
have tested the script with different values and i still cannot get the
email. when i execute the mail function, it returns true, so i know it gets
to the mail server, but the mail server doesnt actually send it. i am being
hosted by a company and am sure the mail server is up and working for me. is
there a way i need to feed it a username/password with php? any ideas on why
its not working? im completely stumped.
<?php
ini_set("SMTP","smtp-relay.affinity.com");
$mail_to = "webmaster@somewhere.com";
$mail_from = "besc@somewhere.com";
$mail_subject = "php mail test";
$mail_body = "test";
if ( mail($mail_to, $mail_subject, $mail_body))
{echo("sucess");}
else
{echo("fail");}
?>
--
Brad Esclavon
besclavon@hotmail.com
(H) 404-875-4561
(C) 404-291-1082