mail() failed

[php]$mailsent = mail( $too[$t], $subject, $message, $headers );
echo $mail_sent ? “” : “

Mail failed: “.$too[$t].”

”;[/php]

What about the above code would make the mail() funtion return false even though it sent the mail?

I don’t think it did. The variable you stored the return value in ([tt]$mailsent[/tt]) is NOT the same one you are testing ([tt]$mail_sent[/tt]). Get rid of that underscore and you should be fine.

Great observation. It is always things like that breaking my code. :stuck_out_tongue:

Sponsor our Newsletter | Privacy Policy | Terms of Service