Smart Mailer PHP tutorials
| Rating: | 6 users |
|
3.2 out of 5 |
Smart Mailer Tutorials - Send mail to one recipient
How do you send mail to one recipient when form is submitted
You 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
- 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:
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: 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.
I need to put a pause of 5 seconds between each email that gets sent out with this tool. For some reason my webserver cant handle email after email without a pause in between. Can someone help me modify this awesome tool to pause 5 secs between each email it sends out?
Thanks in advance
Dave












DMXzone's communications editor, Frank, is an enthusiastic, socialising project manager who loves people that inspire.