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 = '[EMAIL PROTECTED]';

$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:[EMAIL PROTECTED]> 

Reply via email to