Problem with mail()

From: Date: Thu, 17 Jun 2004 14:37:03 +0000
Subject: Problem with mail()
Groups: php.general 
Request: Send a blank email to php-general+get-188495@lists.php.net to get a copy of this message
New to php, can't see the problem with mail(). Server running 4.0.0 Path to sendmail: /var/sbin/sendmail Using a simple form for test purposes, collect three pieces of info: name, address, csz then POST to the page containing the code below. All of the echo statements produce the expected results, including the 'Successful send' in the if mail() section; but the email is never received. <?php $name = $HTTP_POST_VARS['name']; $address = $HTTP_POST_VARS['address']; $csz = $HTTP_POST_VARS['csz']; $to = 'aldridgek@comcast.net'; $subj = 'Sending Mail thru Forms'; $body = "You have given the following info: If this is not correct, be sure and notify us right away. Name: $name Address: $address City, State and Zip code: $csz"; echo ("$name <br/>"); echo ("$address <br/>"); echo ("$csz <br/>"); ?> <?php if (mail($to, $subj, $body)) { echo ("Successful send"); } else { echo ("Failed"); } ?> any / all suggestions would be greatly appreciated, I'm having no luck with tech support at the ISP. Thanks in advance, Keith <mailto:aldridgek@comcast.net>

« previous php.general (#188495) next »