# Miscellaneous > Database Programming >  Email Headers for Mac and Netscape

## Najjar

Hi,
I have a code that sends an email with HTML Tags using PHP and 
it works great for Outlook express but it does not work for Mac or Netscape,
after the code below I continue my HTML code with buttons, textarea, and 
forms...
Does anyone know what are the right headers to send for Mac and/or Netscape.
Thank you in advance guys
This is my code it might help someone else.
--------------------------------------
$headers = "From: $from_name<$from_email>\n";
$headers .= "Reply-To: <$from_email>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/related type=\"multipart/alternative\"; boundary=\"----=MIME_BOUNDRY_main_message\"\n";
$headers .= "Content-Transfer-Encoding: base64\n";
$headers .= "X-Sender: $from_name<$from_email>\n";
$headers .= "X-Mailer: PHP4\n";
$headers .= "X-Priority: 3\n";
$headers .= "Return-Path: <$from_email>\n";
$headers .= "This is a multi-part message in MIME format.\n";
$headers .= "------=MIME_BOUNDRY_main_message \n";
$headers .= "Content-Type: multipart/alternative; boundary=\"----=MIME_BOUNDRY_message_parts\"\n";

$message = "------=MIME_BOUNDRY_message_parts\n";
$message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
$message .= "Content-Transfer-Encoding: quoted-printable\n";
$message .= "\n";
$message .= "-- plaintext version of the message\n";
$message .= "\n";
$message .= "------=MIME_BOUNDRY_message_parts\n";
$message .= "Content-Type: text/html;\n charset=\"iso-8859-1\"\n";
$message .= "Content-Transfer-Encoding: quoted-printable\n";
$message .= "\n";
$message .= "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n";
----------------------------------------

----------


## Najjar

Guys I found the solution:

$separator = "MiraxTesting";

$header = "From: $from_name<$from_email>\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Reply-To: <$from_email>\n";
$header .= "Content-Type: multipart/alternative; charset=\"iso-8859-1\"; boundary=\"$separator\";\r\n\r\n";
$header .= "Content-Transfer-Encoding: 8bit\r\n";
$header .= "X-Priority: 3\r\n";
$header .= "X-Mailer: phpmailer [version 1.40]\r\n";
$header .= "Return-Path: $from_email\r\n";


$separator = "MiraxTesting";
$message = "--$separator\r\n";
$message .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n";
$message .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
$message .= $part2."\r\n\r\n";
$message .= "\n";
// your html goes here -- It didn't appear properly without
// the weird markup that outlook added after sending
$message .= "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\r\n";

----------


## nicc777

You should avoid sending e-mail in HTML and rather stick to ASCII text. Many Internet users also use tools like kmail and Pine, which does not always displays the formatted text (my personal setting in kmail as well). The reason is to stop all those nasty JavaScript etc. that spammers send.

Also something to consider is that some companies ( like the one I work for ) will simply strip your HTML to produce normal text anyway - also as a security method.

Keep it simple. Most modern mail clients auto detects URL's in clear text anyway, so you can still easily use hyperlinks from clear text e-mail.

Cheers

----------


## Najjar

Thanks for the information man
great
but i'm sending this email to my supervisor i think this will be fine 
for me
Thanx again

----------

