MassMailer adds scheduled email and SMS functionality to PHPRunner and ASPRunner.NET applications. Use it to send newsletters, billing reminders, scheduled reports, notifications and other recurring or one-time messages based on your application data.
You can get this template for $50.
Already own MassMailer template v1, v2 or v3? Upgrade to version 4 for $25.
Note: MassMailer requires a valid license of PHPRunner or ASPRunner.NET version 11.1 or later.
Click images for full-size screenshots.
1. Configure email settings in PHPRunner or ASPRunner.NET under Miscellaneous > Email settings.
2. Create the SQL query that supplies recipients and other data for the task. Save the query as a .sql file in the queries folder of the generated MassMailer application.
For example:
MassMailer reads SQL queries from files instead of allowing an administrator to enter arbitrary SQL directly in the application. Only .sql files located in the queries folder are available for selection.
3. Create a new MassMailer task and select the appropriate SQL query file. For a one-time task such as a newsletter, choose the manual interval. For recurring messages, choose the appropriate schedule.
4. Populate fields such as To, Subject and Email body. You can insert fields returned by the SQL query using placeholders such as %Email% or %FullName%.
5. Preview the message and send a test email. If everything looks correct, save the task.
6. For recurring tasks, schedule the MassMailer cron endpoint to run regularly.
The MassMailer scheduling URL is:
https://yourwebsite.com/massmailer/cron.php
For example, on a Linux server you can call the URL once per hour with:
The MassMailer scheduling URL is:
https://yourwebsite.com/massmailer/cron
You can use your server's scheduler or any external scheduling service capable of requesting this URL at the required interval.
MassMailer uses SQL queries to determine which records should be processed and which database fields are available to the email template.
Create each query as a separate .sql file and place it in the application's queries folder. The query will then appear in MassMailer for selection.
SQL syntax depends on your database. The following examples show several common scheduling queries. Replace mytable and expiration_date with your actual table and field names.
All records:
Records where the expiration date is 30 days away:
Records that expired 30 days ago:
All records:
Records where the expiration date is 30 days away:
Records that expired 30 days ago:
All records:
Records where the expiration date is 30 days away:
Records that expired 30 days ago:
You can use any valid query supported by your database. The fields returned by the query become available as placeholders in the MassMailer template.
MassMailer email templates can contain plain text or HTML together with placeholders populated from your SQL query results.
If the selected SQL query returns fields such as:
ID, FullName, AccountNumber, AmountOwed, DueDate
you can use those fields directly in the message:
When MassMailer generates the message, each placeholder is replaced with the value from the current database record.
Placeholders are case-insensitive. You can also include the SQL query alias:
%main.AccountNumber%
Templates can contain HTML. Enable the HTML email option when using HTML markup in the message body.
Additional SQL queries can be used to insert multiple related records into a single message.
For example, an additional query named orders might retrieve all orders belonging to the current customer. The additional query can reference values returned by the main query:
The corresponding repeating section in the message template is:
The name after %section must match the alias of the additional SQL query.
You can use multiple repeating sections in a template. Nested repeating sections are not supported.
When sending to a subscription list, insert:
%unsubscribe%
MassMailer replaces this placeholder with the appropriate unsubscribe link.
Version 4.0 - December 2018
Version 3.0 - November 2017
Version 2.1 - January 2016
Version 2.0 - May 2015
Version 1.1 - March 2015
Version 1.0 - February 2015
MassMailer requires PHPRunner or ASPRunner.NET version 11.1 or later and works with databases supported by those products.
Yes. Set the task interval to manual. It will not be executed by the scheduler and can be started manually when needed.
If your selected SQL query returns a field named EmailAddress, enter:
%EmailAddress%
in the To field. MassMailer replaces the placeholder with the value from each record.
This field is optional. Use it when you need to update a record after a message has been sent, for example to mark a notification as sent.
The %main.CustomerID% placeholder is populated from the current record returned by the main SQL query.
Separate the statements with semicolons:
Insert %unsubscribe% anywhere in the message body. This placeholder is intended for messages sent to MassMailer subscription lists.
Configure these settings in PHPRunner or ASPRunner.NET under Miscellaneous > Email settings.
The MassMailer subscription form is HTML that can be embedded into another page of your website so visitors can subscribe to a mailing list. It inherits the styling of the surrounding website.
Subscriptions are submitted using AJAX, so the page does not need to reload.
Format the value in the SQL query and give the formatted expression an alias that can be used in the message template.
For example, in MySQL:
You can then use %DueDate% in the email template. Date-formatting syntax differs by database.
Use an HTML img element with a complete HTTPS URL to the image:
Yes. MassMailer can send email, SMS or both. SMS delivery uses the SMS provider configured in PHPRunner or ASPRunner.NET.
Yes. MassMailer can attach a project page as HTML or PDF. You can send the same attachment to all recipients or generate an attachment using data belonging to each individual user.
See the MassMailer password expiration and reminder example.