I am unable to use PHP mail() function from my paid hosting account, why?
Answer: Here is a script example you can test php mail function with:
<?
$from = “From: You <you@yourdomain.com>”;
$to = “you@yourdomain.com”;
$subject = “Hi! “;
$body = “TEST”;
if(mail($to,$subject,$body,$from))
echo “MAIL – OK”;
else
echo “MAIL FAILED”;
?>
This script is sending email (to you@yourdomain.com) and printing “MAIL – OK” on the page.
Please note that the ‘from’ header should be an existing email account inside your Email Manager of your hosting Control Panel.




