There are two varieties of email. Text and HTML. Text email is like regular text messages. HTML email is like viewing a webpage with colors and images. To create the effect of an HTML email, a couple of extra headers must be added.
$to = "admin@mistonline.in";
$subject = "My HTML email test.";
$headers = "From: myplace@here.com;\r\n";
$headers .= "Reply-To: myplace2@mistonline.in;\r\n";
$headers .= "Return-Path: myplace@mistonline.in;\r\n";
$headers .= "MIME-Version: 1.0;\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message .= "<h1> This is a test </h1>";
$message .= "";
if ( mail($to,$subject,$message,$headers) ) {
echo "The email has been sent!";
} else {
echo "The email has failed!";
}
MIME stands for Multipurpose Internet Mail Extensions. It is a set of instructions that allows emails to be sent in more than just plain text.
Content-Type sets what type of data is goign to be sent. The default value would be “text/plain”.
Charset is character set. Each language or set of characters has its own title or name. This value lets the recipient email know which one is used to display the body message.
Incoming search terms:
- $headers = Return-Path: javascript (1)
- php to html using htaccess (1)
- php html mail (1)
- php html interview (1)
- java html reply email (1)
- interview question email technology (1)
- html uses (1)
- html text email php 5 2011 (1)
- html mail using php mistonline (1)
- html email interview questions (1)
- html e-mail php (1)
- free Html mail (1)
- email html interview questions (1)
- why emails are spam php text/html 2011 (1)
You will also be interested in ,
- Add to favorites or bookmarking using javascript in firefox and internet explore [IE]
- Close Event In Javascript For Firefox, IE and Chrome
- Close Event In Javascript Using OnUnload()
- Custom Error Pages Using .htaccess
- Pass PHP Value To Javascript
- Find Absolute Path Of A File Or Directory Using PHP
- Learn CSS Basics Very Simple Tutorial
- Simple XML Reading Using PHP
- Cursor:hand css not working with mozilla/firefox
- Text Size Switching Using PHP

Please let me know if get any mail.