On Tue, September 26, 2006 11:09 am, php@xxxxxxxxxxxx wrote: > I have an issue with sending email via PHP which may be a > configuration problem with either PHP, Apache, or possibly a Sendmail, > but I don't know which yet. I figured I'd start here first. > > Here's the situation. I have several webpages that send email to > users for various reasons. We have our webserver, an intranet > webserver, configured to connect to our smtp server which sits on a > different box. The script looks like this: > > <?PHP > $from = "webmaster@xxxxxxxxxxxx"; > $to = "someemail@xxxxxxxxxxxx"; > $subject = "Test"; > $msg = "This is a test from my site\n\nTimestamp: " . date("r"); > $headers = "From:$from\r\n"; Add a space after the ':' to be kosher. Add a Reply-To: Add an Errors-to: (I think?) > if(!mail($to,$subject,$msg,$headers)) { die("Unable to send"); } *IF* you are using PHP5 (?) and *IF* your security settings allow it, the optional fifth argument will let you specify the "real" sender of the message, which the responder may or may not be using to bounce to. http://php.net/mail -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php