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)
- interview question email technology (1)
- html uses (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 ,
- Adding and removing child nodes using javascript and DOM
- Simple page flip effect using Jquery, css and simple html
- How To Set And Get Cookies Using PHP
- Custom Error Pages Using .htaccess
- Learn CSS Basics Very Simple Tutorial
- Text auto slide information box using javascript.
- CSS or Table?
- Image shadow using css and html
- Close Event In Javascript For Firefox, IE and Chrome
- Enter only numbers inside a input field of a form using javascript


Please let me know if get any mail.