Formatting Emails

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Addos
Forum Contributor
Posts: 305
Joined: Mon Jan 17, 2005 4:13 pm

Formatting Emails

Post by Addos »

I wonder what advice you can give in relation to sending emails formatted so that they
display with a bit of colour in the background and a nice font or what are
the implications of doing this. I have a few forms and one specific form
where a user is sent an email as part of the process of changing a password
and I was thinking it might be nice to have similar colour schemes that are
found on each specific site. I've being playing with a bit of PHP (below)
with reasonable success but I suspect that this could end up displaying a
whole load of HTML in some Email clients.

I use Outlook Express and I wonder if anyone knows how to turn off the accepting of rich text or plain text so that I can test when I send out these as a multipart email.

Thanks

Brian

Sample of PHP that I'm using..........

Code: Select all

$from = "Brain Testing Email";
 $subject = 'Is it worth it ' ."\r\n";
 $headers = "MIME-Version: 1.0\r\n";
 $headers .= "Content-type: text/html; charset=iso-8859-1" ."\r\n";
 $headers .= 'To: admin<infoblahblah.com>' ."\r\n";
 $headers .= "From: $from" ."\r\n";
 $message = file_get_contents('mail/recover.php');
Post Reply