Smart Mailer PHP Manual
Quick and easy, great looking HTML Mails in PHP!
You can offer your clients the ability to send HTML mails based on a template (either on your machine or at a URL), each personalised with the recipient's name. You can add attachments to everyone, or a group of people, there's progress bars while you're sending them - all this in an external PHP include file, so just a couple of lines on your page.
These tutorials show you how to use the Smart Mailer PHP extension.
The Basics: Sending mail to one recipient when form is submitted
You've created a simple contact us form and would like
to have the results of the form emailed to you? In this tutorial we will
create a simple contact form and when the user submits the form results will be
mailed to you.
How to do it
- Open page - Open your php file
that will display the contact form. I have created a form with the
following fields: Name, Company, Email, Question/Concern.
- Create your variables - To be able to email the content of the form, you need to
create variables for the different fields and bind them to the form. I
have named my textfields according to the info needed like name, company,
email and question.
Click on the Bindings tab and the + sign. Select Form Variable and fill in
the name of your fields. Do this for each field, so four times. In the
Bindings you will see this
- Apply Smart Mailer extension: Main - You can find the Smart Mailer extension under Server
Behaviors | DMXzone | Smart Mailer.
There are 4 tabs: Main, Content, Attachments, Setup.
Main:
Here you can enter where the mail is coming from and where it is going to.
For this tutorial I selected One Receiver.
In the Submitting choose on any form submit. This will send the mail as
soon as a user hits the submit button.
Click on the lightning bolts for the dynamic data for the From Name and
Email:
- Apply Smart Mailer: Content - In Subject I choose to select the company name as dynamic
data.
In Body I choose Static text/html. I will see the company name and the
question they have. To spruce up the mail you can add html tags. Here the
word Company and has the following question will be italic.
- Apply Smart Mailer: Attachments - No attachments added for this tutorial.
- Apply Smart Mailer: Setup - There are two components: SMTP and SendMail. Select the
Server you are using.
In Redirect select the URL users will be directed to after they submit the
form. In this case a thank you page.
- Click OK -
Click the OK button to apply the Smart Mailer extension. 5 messageboxes
will appear saying that the following files have been copied into your
site ScriptLibrary directory: incSmartMailer.php, htmlMimeMail.php,
MimePart.php, RFC822.php and smtp.php
Don't forget to upload them to the server.
Lubov has been with DMXzone for 8 years now, contributing to the Content and Sales departments. She is bringing high quality content in the form of daily blog updates, reviews, tutorials, news, newsletters,update emails and extensions' manuals. If you have a product that needs publicity or any other questions about the entire DMXzone community, she is the one you can contact.
See All Postings From Lubov Cholakova >>