Hi everyone,
I have a php script that sends an email. It looks like this:
<?php
// subject
$subject = "$first_name $last_name has sent you a message on The Red-line";
// message
$message = "<html>
<head>
<title>
The Red-line
</title>
</head>
<body>
<p>
Hi $war_first,
</p> <br />
<p>
$first_name $last_name has sent you a message on the Red-line. To view your message, please login to <a href='www.thered-line.com'>the Red-line.</a>
</p> <br />
<p>
Sincerely,
</p> <br />
<p>
The Red-line Operator
</p>
</body>
</html>";
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= "From: The Red-line [email protected] \r\n";
$headers .= "To: $war_first $last_war <$war_mail>\r\n";
// Mail it
mail($war_mail, $subject, $message, $headers);
?>
When I was testing this out on the remote server, I used this script to send an email to my inbox at [email protected]. I got the email but the "from" part doesn't work . Yahoo says that my email was sent from "[email protected]"
Does anybody have a clue as to why this isn't working?
Thanks