specifying a font in PHP-generated email

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings.

I'm attempting to create an HTML email via PHP and cannot get the email
to render in the correct font.  I've made several stabs at it, the most
recent one below.  The same code that works just fine on a web page
won't work for me here.  What am I doing wrong? 

Any and all help appreciated.

Kenn


<?php
$headers = "From: webserver@localhost\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$boundary = uniqid("HTMLDEMO");
$headers .= "Content-Type: multipart/alternative" .
   "; boundary = $boundary\r\n\r\n";
$headers .= "This is a MIME encoded message.\r\n\r\n";
$headers .= "--$boundary\r\n" .
   "Content-Type: text/plain; charset=ISO-8859-1\r\n" .
   "Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode("This is the plain text version!"));
$headers .= "--$boundary\r\n" .
   "Content-Type: text/html; charset=ISO-8859-1\r\n" .
   "Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode("<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style type=\"text/css\">
<!--
h1 {color: #000000;
font-family: \"verdana\" ; }
-->
</style>
</HEAD>
<BODY>
testing<br>
<h1>TESTING 222</h1> test over.
</BODY>
</HTML>
"));
//send message
mail("kenn@xxxxxxxxxxxxxxxxxxx", "Another HTML Message", "", $headers);
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux