ElectricRain wrote:I just want to know about the $done bit- Im having a hard time getting my head around whether you can use !$done to say a variable does not exist? or do I need (!isset($done)) ?
And if the mail hadnt sent, would $done definately not exist?
At the link i gave you is says:
Return Values
Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise.
It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination.
so your script is alright!
$done = @mail($to, $subject, $message, $from);
if (!$done) { echo ("Error sending mail message"); }