As a noob to php scripting i have a ton of questions:
why doesn't my mail() work? i get a fail with a pretty basic script...
when i run mail() it fails and yet i'm doing nothing fundamentally different than mrnutt and the tutorial example that is linked by vv.bbc19...
Code:
<?php
// mail example (doesn't work - no mail server???)
$to = "???????@tmrsoft.x10.bz";
$subject = "Test Mail";
$message = "Hello! This is a simple test email!";
$from = "???????@tmrsoft.x10.bz";
$headers = "From: $from Content-type: text/plain";
if(!mail($to, "Subject: $subject", $message, $headers))
echo "mail error<br/>";
else
echo "mail sent<br/>";
?>
i'm sending an email to myself, i gave up on sending to my gmail account.
i just added the Content-type: text/plain line because someone said that would make it work - but again no dice.
I suspect that i can't access the mail server unless i'm making an obvious error in my code that I can't see. So, is there anythiing i need to do to make this work, i've wasted days on this. I assumed that everything is configured properly but obviously i'm wrong, any help would be greatly appreciated.