This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

HTML E-mail Using PHP

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.

< ?php
$to = “ yourplace@somewhere.com This e-mail address is being protected from spam bots, you need JavaScript enabled to view it “;
$subject = “My HTML email test.”;
$headers = “From: myplace@here.com This e-mail address is being protected from spam bots, you need JavaScript enabled to view it “;
$headers .= “Reply-To: myplace2@mistonline.in This e-mail address is being protected from spam bots, you need JavaScript enabled to view it “;
$headers .= “Return-Path: myplace@mistonline.in This e-mail address is being protected from spam bots, you need JavaScript enabled to view it “;
$headers .= “MIME-Version: 1.0\r\n”;
$headers .= “Content-Type: text/html; charset=ISO-8859-1\r\n”;

$message = “”;
$message .= “

This is a test

”; $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.

VN:F [1.5.7_846]
Rating: 0.0/10 (0 votes cast)
VN:F [1.5.7_846]
Rating: 0 (from 0 votes)

Related posts:

  1. Simple PHP mail Script
  2. PHP E-mail with attachment
  3. Send Email to Multiple Persons using php
  4. Get Method and Array Manipulation In Symfony
  5. Database Connection And Pagination In PHP Using Symfony Framework
  6. Load Another Webpage Content Using Simple Jquery
  7. Speed up wordpress using .htaccess part 1

1 Comment

  1. sampath says:

    Please let me know if get any mail.

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: 0 (from 0 votes)

Leave a Reply

Comments (required)

Spam Protected