MassMailer template - untuk newsletter & automatic daily/weekly email dalam PHPRunner, ASPRunner


MassMailer template - send email newsletters and automatic daily/weekly emails

This template is designed to perform two common emails tasks:
  1. Send email newsletters
  2. Send daily, weekly or hourly emails. Perfect for billing reminders or daily reports
For a limited time you can get this template for $50.
If you are already own MassMailer template v1.x you can upgrade to version 2 for $20.
MassMailer template is available to users of PHPRunner 8.x, ASPRunnerPro 9.x, ASPRunner.NET 8.0.

Changes history

Version 1.0 - February, 2015
  • Template based emails
  • Email scheduling
  • Email preview
  • SQL query/template syntax instant manual
Version 1.1 - March, 2015
  • Repeating sections in templates
  • Execute SQL after each email
Version 2 - May, 2015
  • Send email/newsletter with attachments
  • Multiple subscription lists
  • Bulk import subscribers
  • Subscription widget/unsubscribe link
  • Single opt-in or double opt-in
  • Use a free form query or pick one of subscription lists while selecting recipients

Screenshots

Click images for full size screenshots

List of tasks

Single task setup

Email body and attachments

SQL Query results view

SQL Query help

Email preview

Template syntax help

System requirements

  • MassMailer template requires PHP 5.3 or better
  • Supported databases are Microsoft Access, SQL Server, MySQL, Oracle and Postgre

Setup instructions

1. Make sure you specified correct SMTP settings in PHPRunner project. SMTP settings can be found under Miscellaneous->Email settings.
2. Create a new task. For one off tasks like email newsletter choose Interval Type 'manual'. For recurring tasks like daily reports choose Interval Type like 'day'.
3. Enter SQL Query, make sure it returns correct data. Populate email fields like 'To', 'Subject' and 'Email body'. Preview your email. Send test email. If everything looks good save your task.
4. Schedule a cron job to run cron.php page once a day or once an hour.
If your website runs on Linux web server and you have access to crontab file you have two options here.

Method 1: Execute the script using php from the crontab

To execute cron.php every 1 hour do the following:
?
1
2
# crontab -e
00 * * * * /usr/local/bin/php /home/mywebsite/cron.php

Method 2: Run the php script using URL from the crontab

The URL to schedule is http://website/massmailer/cron.php. The following script executes the php script every hour by calling the URL using WGET. The -q option indicates quite mode. The "-O temp.txt" indicates that the output will be send to the temporary file.
?
1
00 * * * * /usr/bin/wget -q -O temp.txt http://website/massmailer/cron.php
If you are not sure how to schedule a cron job open a free account with monitoring service like Montastic and add cron page URL to be pinged once a day or or once an hour.
Cron page URL:
PHPRunner: http://website/massmailer/cron.php
ASPRunnerPro: http://website/massmailer/cron.asp
ASPRunner.NET: http://website/massmailer/cron

Frequently asked questions

I've created a task but don't want it to run yet. Can I make it inactive?

Yes, you can choose Interval to be manual and it will not run until you start it manually.

My emails addresses are stored in the database field. How do I setup this?

In TO field specify %EmailAddressField%. Instead of EmailAddressField use the actual name of the field that stores email addresses.

How do I use 'Execute SQL query after email sent' field

This field is optional and can be left empty. Use it when you need to update a record in the main table after email is sent. Typical use includes updating Status field with value like 'sent' or update EmailSent field with the current date/time.
Sample query:
?
1
update customers set status='sent' where CustomerID = '%main.CustomerID%'

Note how we reference the field from the main SQL query via %main.CustomerID%.

How to insert unsubscribe link?

Simply insert %unsubscribe% tag anywhere in email body. Note that this tag only makes sense when email is sent to subscription list.