View Single Post
Old 01-28-2013, 09:05 PM   PM User | #15
ckirkster
New to the CF scene

 
Join Date: Jan 2013
Location: UK
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
ckirkster is an unknown quantity at this point
I might be confusing you a little.
I was using minkoko's last code as an example. I also never tested it but can see at second glance the

PHP Code:
mail($to,$name,$message,$headers);
  if(
mail)
 {
     echo 
"Mail Sent.";
 }
 else
 {
     echo 
"Cannot Send your mail for error";
 } 
should read
PHP Code:
  if(mail($to,$name,$message,$headers))
 {
     echo 
"Mail Sent.";
 }
 else
 {
     echo 
"Cannot Send your mail for error";
 } 

The code I added to it is there to give you a simple example of setting errors and stopping the script calling the "mail" function if there are errors.

That should help point you in the right direction
ckirkster is offline   Reply With Quote