Forum Moderators: coopster
<?
$email = "any_address@yahoo.com";
$to=$email;
$subject="welcome";
$header="from:me@mysite.com";
$message="Dear User,Thank You for signing up. ";
if(mail($to,$subject,$message,$header))
{
echo "mail sent successfully";
}
else
{
echo "mail not sent..error";
}
?>
Good thing is it sends to hotmail without any problem.
$header="From: me@mysite.com";
Note the capitalization of "From" and the space after the colon, which is the conventional formatting. Some services may not recognize your formatting, assume the return address is missing, and classify your message as SPAM.