Create and Send an HTML Email Form Using PHP
An HTML email form is often used in email marketing to
a greater response from potential customers. However their
not much information on how to actually create an
html email form or template to achieve this.
of this article discussed how to create and send simple
html email. In this article we will create an interactive
html email form.
Benefits of creating an html email form
interactivity with your customers.
*use of visually appealing
graphics, icons and forms.
*all the most popular email
software now support html email.
*ability to track responses
questionaires, surveys and newsletters.
Here is the step by step process how to create an html
1. Create your interactive html email form page in
html editor including any graphics or icons to make it
Make sure you always use absolute urls for graphics
absolute link for your formmail script
they won't appear correctly.
Here's an example of an interactive html email form viewed
If you want to see the html code used for the form, click
Internet Explorer and go to: view - source.
2. Name your html formmail page (ie newsletter.htm)
and save it.
Keep your html email simple by eliminating the meta tags (ie
title, description, keywords). Don't use large graphics as
these will slow down the loading time of your email plus
fill your customer's inbox capacity.
3. Obtain a copy of the php formmail script and
save it to the
same directory as your newsletter.htm page.
(You can get a copy of this script by sending an email
4. Name this script.. securemail.php (or something
but not formmail.php so spammers don't use it).
the html form page (newsletter.htm)
you created above. You
use this script in combination
with an html form on your
5. Edit your newsletter.htm page - make sure you
form action otherwise your form won't work ie
securemail.php" method="post" target="_blank">
Insert different titles and images for your newsletter or
6. Edit the php formmail script.
Replace the title, email and confirmation comments with
7. Create a new directory on your current web site
htmlmail (ie www.ihost-websites.com/htmlmail/).
8. Place your html formmail page, graphics and script
html directory. This will help keep all your files
If you don't currently have a web site, then register a
name first, design your html email form and upload all
(form, graphics, script) to your new web host (make sure
web host carries the php feature).
9. Upload the html directory to your web server.
10. Test the new html email form on your server first.
your html email form page works corrrectly when submitting
form - you should receive a confirmation immediately upon
You are now ready to send your html email.
11. Open your Email Software - in outlook express
(since it's the
most popular) go to:
Fill out the to and subject fields
Place your cursor in the body of your email message
Check insert - text from file
In "files of type" box scroll to "HTML Files"
In the "look in" box scroll to the saved html page on your
Note: This script may not work with other email
12. Email a test to yourself and friends who have
email programs before you send it to your subscriber list.
will ensure your html email will appear correctly to all
Now you have a template you can use to send out your html
emails. You then won't have to repeat this process again.
You can also alter the look of your html email template by
changing the graphics and/or fields, then uploading the
to your server.
Try using an html email form for your future questionaire,
survey, ad or newsletter.
You will be pleasantly surprised!
PHP formmail script
Send an email to:
firstname.lastname@example.org to receive
a copy of the script.
free version allows a list of up to 100
Free HTML Templates
101 Highly Effective
Strategies to Promote Your Web Site