View Single Post
 
Old December 14th, 2003, 12:20 PM
sami sami is offline
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Yes quesadilla5 is completely correct, the fourth parameter is optional, sorry about that. But I think you are missing some curly braces and I think your script should read like this:

<?php

     error_reporting (E_ALL);

     $ret = mail("mail@domain.com","test","123","From : webmaster@domain\r\n");

    if ($ret)
      {
       echo "sent";
      }

    else
      {
       echo "not sent";
      }

?>

It is like this simple example:

if(this is true)
   {
    do this
   }
else
   {
    do this instead
   }


Sami