I am a newbie so please have patience. I just took an online tutorial on how to send an HTML email using php's mail(); function. It works great. BUT, the problem is in the "FROM:" section of the emails that I send. This is what recipients of my emails see:
FROM: <me@my_domain.comContent-type: text/html>
Do you see how the 'content-type: text/html' is shown as part of my return email address?
Can someone explain to me WHY please? here is my code:
<?php
$message = "<html><head></head><body>";
$message .= "$stuff"; // html message converted to variable for simplicity here
$message .= "</body></html>";
$from = "me@my_domain.com";
$to = "you@your_domain.com";
$subject = "HTML Email";
$headers = "From: $from";
$headers .= "Content-type: text/html\r\n";
/* Now we are ready to send the email so we call php's mail() function
With the appropriate variables from above included in the brackets */
mail($to,$subject,$message,$headers);
?>
Lastly, this would be icing on the cake, if you could tell me how I can show not only my email address without the 'Content-type: text/htm' business mucking it up, but also, if I could show my email address and my name.
Thanks!
I appreciate it.