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 or v2 you can upgrade to version 3 for $25.
MassMailer template is available to users of PHPRunner 9.x, ASPRunnerPro 9.x, ASPRunner.NET 9.x.

Changes history

Version 3.0 - November, 2017

  • Bootstrap-based layouts
  • Send email or SMS or both
  • Schedule delivery by day of week
  • Attach project page as HTML or PDF

Version 2.1 - January, 2016

  • Add/Edit task pages modification made easy
  • Added reply-to field to emails

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

Version 1.1 - March, 2015

  • Repeating sections in templates
  • Execute SQL after each email

Version 1.0 - February, 2015

  • Template based emails
  • Email scheduling
  • Email preview
  • SQL query/template syntax instant manual

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:

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.

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:

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.

How do I change FROM email address?

This can be changed right in the software (PHPRunner, ASPRunnerPro, ASPRunner.NET). Proceed to Miscellaneous screen, click 'Email settings' and enter FROM email address there.

How do I setup SMTP server to send my emails?

This can be changed in the software (PHPRunner, ASPRunnerPro, ASPRunner.NET). Proceed to Miscellaneous screen, click 'Email settings' and enter SMTP server details there.

What is subscription widget?

"Subscription widget" or "subscription form" is a piece of HTML code that can be inserted into any page of your website allowing website visitors subscribe to your newsletter. Here is how it typically looks. Subscription widget doesn't come with its own CSS and will inherit look and feel of your website.

Subscription is done via AJAX, page won't be reloaded.

How to format date values in my emails?

By default date values are presented as is in your email meaning you will see something like this: Your invoice is due on 2015-06-17 00:00:00. This is obviously not what you looking for.

You can modify your SQL query to retrieve date values in nicely formatted way i.e. 06/17/2015

And this is how it supposed to look when you run it:

Each database comes with its own functions for date formatting. In MySQL you can use DATE_FORMAT.

How to insert an image into my email?

The best option is to use HTML email and insert an img tag specifying complete URL of image file. Here is an example:

How to execute multiple queries after email was sent?

You can use multiple queries in 'Execute SQL query after email sent'. Use semicolon to separate queries.

Do you have more complicated examples of MassMailer template usage?

Glad you asked. See how you can manage password reminders and expiration using MassMailer template.

What SMS providers do you support?

At this moment we only support Twilio. Proceed to Miscellaneous screen in the software, click 'SMS settings' and enter Twilio credentials.

How to attach a page from the project that is password protected?

1. In MassMailer task either enter hardcoded username and password or select username and passwords fields

2. In your project add the following code to AfterAppInit event. MassMailer template will pass username/password to the page to be exported and the following code will help to access a password protected page.

PHPRunner: ASPRunner.NET: ASPRunnerPro: