Making my web page to html code?

Does anyone know anything out there that can make my webmail that I’ve designed as a web page to make it work as a html mail?
Since some rules and codes and links is handled a bit different it would be nice to copy and paste the code I have and get it out as a working code for my e-mail that I would like to send.

Anyone have any ideas? Right now I make a web page for those who can’t read html in their e-mail (so they can click on a link), but when I want to include my message, images, links aso I put the code with the head tags, then first part of the message, then a new part including a link, then the rest of the message, another image, another link…

It looks something like this:


$to = $row_rs_send['email'];
$subject = "SUBJECT OF MAIL";

$headstart = '<html><head><title>MY NEWSLETTER</title></head><body>';

$stilmall = '<style type="text/css" media="screen">
      body {
         margin: 0;
         padding: 0;
         background-color: #ffffff;
      }

      td.permission {
         padding: 20px 0 20px 0;
      } 
and so on...

$headpart2 = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="center"><table width="580" border="0" cellspacing="0" cellpadding="0"><tr><td class="permission" align="center"><p>Having trouble reading this email? View it in your browser by clicking <a href="';
			   
$troublelink = 'http://www.mysite.com/webmail/nov2010.php?code=';
$troublecode = $row_rs_send['code'];

$headpart = '" target="_blank">HERE</a>.</p></td></tr><tr><td class="header" align="left" valign="bottom"><img src="http://www.mysite.com/webmail/header.jpg" alt="MySite" width="580" height="130" /></td></tr><tr><td><table width="580" height="130" border="0" cellspacing="16" cellpadding="0" class="content"><tr><td class="mainbar" align="left" valign="top" width="580"><h3>';
						   
$sendmonth = 'November 2010</h3>';

$text1 = '<h2>Headline</h2><p><img src="http://www.mysite.com/webmail/main-content-inline-pix_144.jpg" alt="ImageTitle" width="144" height="144" border="1" align="right" />Some text</p>
<p>More text. And click if you want to.<a href="';

$listen = 'http://www.mysite.com/file/click1.php?code=';
$listencode = $row_rs_send['code'];

$text3 = '"><br><br>CLICK HERE TO SEE THIS</a>';

Well, it’s something like that and very easy to get into trouble when chancing the content. So, it would be great to find a page that could make my webpage to a working code for this. Any ideas?

not sure what you mean by web mail and html email.

an email is just text format. a html email is just a text email with html elements and styling in it.

hopefully this tutorial on how to send both plain text and html format emails will help.

Well, what I am looking for is something that can generate web friendly html out of the content part that looks good on a web page into html mail.

A HTML email requires some really old school HTML for it to work and be compatible in most email clients. Not every email client supports CSS for example.

My advise would be not trying to convert any of the content but creating the email and the webpage version separately.

Take a look at this Sitepoint article
http://articles.sitepoint.com/article/code-html-email-newsletters

Yeah, CSS support in email clients is so sporadic as to be non-existent. Time to brush up on HTML 3 skills mouldering in the closet.