User Tools

Site Tools

Translations of this page:

plugin:autoresponder

Autoresponder

Compatible with version

phplist 3

plugin Sends a campaign to subscribers based on a period since they subscribed

Last updated on
2018-02-11
Repository
Source
By Duncan Cameron

Purpose

This plugin lets you set up autoresponders - campaigns that are sent to subscribers when a specified period of time has elapsed since they subscribed to a particular list. This is also referred to as “drip-marketing”.

Installation

See the README file on the GitHub page https://github.com/bramley/phplist-plugin-autoresponder for how to install and configure the plugin.

Upgrading from version 2 to version 3

If you have just installed the plugin then you will be using version 3 and can ignore this section.

In version 3 of the plugin (released on 10 February 2018) there was a change to the method of selecting subscribers to which an autoresponder should be sent. The change affects the message table, which needs to be updated immediately after upgrading the plugin.

If you upgrade the plugin through phplist on the Manage Plugins page then the message table should be updated automatically. But if you installed and upgraded manually then you will need to change the message table using phpmyadmin or similar tool.

The necessary change is to clear the userselection field on the message table using an update query similar to this

update phplist_message
set userselection = null

In version 3 the plugin no longer uses the attribute that was created for each autoresponder by version 2 of the plugin. It is safe to delete any such attribute through the Configure Attributes page in phplist.

Usage

How it works

In order to control when autoresponder campaigns are actually sent to subscribers it is important to understand a bit about how the plugin works.

The plugin doesn't send any campaigns itself. It simply changes the status of a campaign from either “draft” or “sent” to “submitted” when there is at least one subscriber to whom it should now be sent. The plugin checks for those subscribers with processing that is hooked into the process queue command.

The plugin uses the date/time that a subscriber was added to a list, not the date/time that they were initially added to phplist. This allows an autoresponder to be used for existing subscribers who then join a list, as well as totally new subscribers.

Therefore, most importantly, you need to run the phplist process queue command regularly, either as a cron job (which is recommended) or through the admin page. The frequency at which you run process queue will therefore affect the time interval between a person joining a list and being sent the campaign.

As an example, consider creating an autoresponder for a campaign to be sent one hour after a joining a list.
The plugin will change the status of the campaign to “submitted” on the first run of process queue at least one hour after the new subscription. If you have a cron job to run process queue every hour then the time interval between subscribing and the campaign being sent will be at least one hour and could be up to two hours.

To understand that, consider a person subscribing just after the cron job has run. When the cron job next runs it will be just less than one hour since the subscription, therefore the subscriber is not yet ready to be sent the campaign. On the following run of the cron job the subscriber will be ready, but that will be nearly two hours since the subscription.

To have the campaign sent as near to one hour after the subscription you would need to run the cron job more frequently. If it is run every 5 minutes then the time interval would be up to one hour and 5 minutes.

phplist will process any submitted autoresponder campaigns as usual, and those will then eventually change from “submitted” to “sent” status.

The Manage Autoresponders page

The plugin adds an item to the Campaigns menu, Manage autoresponders, through which you can add, amend and delete autoresponders. The page lists existing autoresponders and has a filter through which you can show only those autoresponders for a particular list.

The page shows the number of subscribers who are ready to receive the autoresponder campaign, not yet ready, and have already received the campaign.

Add an autoresponder

You first need to create the campaign that you want to send to the subscribers. Create the campaign in full but do not submit it, so it remains at “draft” status.

The list or lists that you choose on the Lists tab will be those that are used by the autoresponder. When someone subscribes to that list they will be sent the campaign after the chosen time period.

On the Schedule tab is a “stop sending after” date, usually six months after the campaign creation date. phplist will not send the campaign after that date, so you might want to change the date to be far in the future if you want the autoresponder to continue indefinitely.

On the Manage Autoresponders page click the Add button to display the form to add an autoresponder.

The form has these fields that need to be entered

  1. enter a description or the purpose of the autoresponder.
  2. select a campaign from the drop-down list of draft campaigns. The list includes only those draft campaigns that have at least one list selected on the Lists tab.
  3. select a time period from the drop-down list or enter a period directly in the input field - the value can be any number of minutes, hours, days, weeks or years but not months. The period is the time after subscribing to the list after which the campaign will be sent to a subscriber.
  4. optionally select another list to which a subscriber will be added when he has been sent the campaign. This is useful if you want to move subscribers from one list to another.
  5. select whether the campaign should be sent to only new subscribers after the autoresponder has been created, or to all subscribers including those who have already subscribed to the list. The default is to send only to new subscribers. Be careful if you change this because all existing subscribers will be sent the campaign.

Processing the queue

The phplist process queue command needs to be run periodically. This allows the plugin to check for subscribers who now need to be sent an autoresponder campaign, and to submit that campaign.

The recommended way of running process queue is through a cron job so that it is automated. The frequency of the cron job will depend on the time periods of the configured autoresponders, and how soon after those periods you want the campaign to be sent.

For example, if an autoresponder has a period of 1 day, then running the cron job every hour means that the campaign will be sent within 25 hours of subscribing (not 24 hours). For a new subscription the campaign will be sent on the next run of the cron job 24 hours after the subscription.

Managing autoresponders

On the manage autoresponders page you can disable an autoresponder if for any reason you do not want the campaign to be sent.
You can also delete an autoresponder if you do not want to use it any further.

The fields on an autoresponder can be changed apart from the campaign. If you want to use a different campaign then you should create a new autoresponder.

Support

Please raise any questions or problems in the user forum https://discuss.phplist.org/

Change Log

plugin/autoresponder.txt · Last modified: 2018/11/25 09:05 by duncanc

Resources
Contact Us

e: info@phplist.com

Boring Bit

phpList is a registered limited company

UK Company No. 07582966

VAT Registration 122 0788 37

© phpList 2016