HomeSaturday, August 18, 2018, 20:19:08

Sending HTML Email With Images - PHP Tutorial

Tuesday, February 10, 15, 12:06:50, 4 Yaers Ago Via wain, Hits: 10434
Sending HTML Email With Images - Upload Image with PHP - Creating Dynamic Webpages Using PHP and MySQL - Select, Delete, Update..

<form name="myform" action="mail.php" method="POST">
<input type=text name="to" size="25"><br>
<strong>Your Message</strong><br/>
<input type=text name="msg" size="25"><br>

<input type="submit" value="Submit">
<input type="reset" value="Reset">


$message = $_POST['msg'];
//mail body - image position, background, font color, font size...
$body ='<html>
background: #fff;
font-family: "lucida grande", tahoma, verdana;
font-weight: bold;
color: #fff;
background-color: #336699;
margin: 10px;
<div class="content">
<h1>My HTML Mail</h1>
'.$message.'<br />
<img src="" /><br />
//to send HTML mail, the Content-type header must be set:
$headers='MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html;charset=iso-8859-1' . "\r\n";
$headers .= 'From: System Admin <[email protected]>' . "\r\n";
$to = $_POST['to'];
$subject = "My HTML Mail";
//mail function
$mail = mail($to, $subject, $body, $headers);
if(!$mail) {
echo "Error sending email";
} else {
echo "Your email was sent successfully.";

michael Tuesday, February 10, 2015, 14:22:57

@wain great tutorial! Thanks

Sign In



Inserting form data in MySql table

Inserting form data in MySql table with PHP

HTML Button Generator

This script will allow your visitors to create HTML Buttons online. To use the "html button generator" script completely free , the "powered by" link at the bottom of the pages must stay intact.

PHP Cookies - setcookie

Defines a cookie to be sent along with the rest of the HTTP headers.

PHP File Create

Create and write data to a file using the php frwite function.

RSS, MySQL & Smarty

Smarty > Publishing MySQL Data in RSS 2.0

Jquery PHP Contact Form

This script allows your visitors to send you an email directly from your website.

Math Captcha V6

PHP Math Captcha Image Version 6

Contact Us 2.0. with HTML Page and Pop Up Frame

This is the same Contact Us 2.0. that is in this forum, But I have added more options to this script and a html page with a very nice pop Up frame that DONT get block by any pop Up software. Many websites use this type of script to bypass the blocking…

PHP explode

Explode — Split a string by string.

Captcha V2 - Free PHP Script

PHP Captcha protection image Version 2, - Requirement(s): PHP Server, GD Library
About Author


Date Registered: Sun, Feb 8, 15
Last Time Online: Sun, Mar 18, 18
So far has created 115 entries.
This author has not yet filled in any details.