snippet library logo
Amazon.com
in category
PHP / Email / HTML Based Email
Snippet details
ID: 99
Viewed: 3906
Added: 2002-03-21
Version:
Sorry no demo

User Rated at: 1 Stars
Rate This:
Snippets in this catagory         
Show Printable Version
Very basic form to show you how to send html based email. Remember that not everybody can view html email.

General Details
Snippet uploaded by: snippet
Email : webmaster@snippetlibrary.com
Snippet By: snippet

<!---Head--->
none

<!---Body--->


<?
$to 
"you@yoursite.com";
$subject "Test html based email";
// your message is now in HTML
$msg "
<HTML>
<HEAD>
<TITLE>My Message</TITLE>
</HEAD>
<BODY>
<H1 ALIGN=CENTER>Look how cool this is!</H1>
</BODY>
</HTML>
"
;
// add another header
$headers "From: me@mycompany.comnReply-To: someoneelse@mycompany.comnContent-Type: text/html; charset=iso-8859-1";
mail("$to""$subject""$msg""$headers");
echo 
"finished!";
?>





Subject: form in html email
Comment By: on Fri 20th of April 2007 04:54:40 AM
    I want to add a form to an html email - is that possible?
Christian
Subject: form in html?
Comment By: snippet on Fri 20th of April 2007 04:19:07 PM
    You can add anything you want to the email. Just add the form to the $msg variable with all of the html already there. In the end it is all html anyway.

$msg = "
<HTML>
<HEAD>
<TITLE>My Message</TITLE>
</HEAD>
<BODY>
<H1 ALIGN=CENTER>Look how cool this is!</H1>
<form>
....
</form>
</BODY>
</HTML>
";


Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Subject:

Reviewed By:

Write a review:





Terms of Conditions
Powered By
Avian Hosting
© 2005 snippetlibrary.com All Rights Reserved.