Hi, I have a problem
I'm using this function which i got from somewhere and have been modding to auto generate HTML mails to a list.
PROBLEM. Some of them are only getting the raw HTML output (i am getting it ok and a couple of others are).
Does anyone know why this might be (my guess something to do with the headers being sent with the email) If you can suggest one that does work, I would be greatly appreciative...
heres the code
//******************************************************************************
//here is the html mail function, it puts headers on so that the recipient will view the email as html and not plain text
//******************************************************************************
function html_mail($recipient,$subject,$htmlmessage,$from) {
$boundary = uniqid("");
$headers = "From: $from\nContent-type: multipart/mixed; boundary=\"$boundary\"\n\nThis is a MIME-multipart message\n\n";
$message = "\n--$boundary\nContent-type: text/html;\nContent-transfer-encoding: 7bit\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n$htmlmessage\n--$boundary--";
mail($recipient,$subject,$message,$headers);