bookmark_borderSending HTML Email using PHP

PHP has ability to send the mail from the domain using mail function,  this session we are going to discuss about the mail function and its benefit.  First we will create simple form and PHP script to send mail.

Our html file have to, subject and message to send mail.

<title> - Sending HTML Email using PHP - Email form</title>
<form action="mail.php" method="post">
<td><input type="text" name="txtTo" /></td>
<td><input type="text" name="txtSubject" /></td>
<td><textarea rows="6" cols="30" name="txtMessage"></textarea></td>
<td><input type="submit" name="btn" value="Send Mail" /></td>

Our server side script will send the post data using mail function, which mentioned in below. If you are trying to send with html content It will send as it is (html tag in email) Continue reading “Sending HTML Email using PHP”