2 min read

PHPList 2 E-mail Campaign Manager

Get to grips with the PHPList e-mail announcement delivery system!       

Prerequisites

For this article, we’ll make the following assumptions:

  • We already have a working instance of Drupal (version 6).
  • We are hosting our Drupal site and our phpList site on the same web server and with the same URL base. That is, our Drupal site is accessible at http://yoursite.com and our phpList installation is accessible at http://yoursite.com/lists/.

We chose to document the Drupal-phpList integration using Drupal 6, even though Drupal 7 has recently been released. This is because (a) the phpList module for Drupal 7 is still marked as “development” and (b) Drupal 6 has been the official stable version for three years and has a more familiar interface than 7 at this time.
However, the following method described for Drupal 6 will work on Drupal 7.

Installing and configuring the phpList integration module

Go to http://drupal.org/project/phplist and download the latest stable version of the module for Drupal 6.x. Unpack the tar.gz file and you should have a folder called phplist inside. Upload this folder to your Drupal installation’s modules directory and then navigate to Administer | Site building | Modules:

phpList 2 E-mail Campaign Manager tutorial

At the bottom of the modules list, you’ll find the Mail and phpList headings with a single phpList module under each. Check both and click on Save configuration:

phpList 2 E-mail Campaign Manager tutorial

External phpList configuration

Navigate to Administer | Site configuration | PHPlist to set up the database credentials and other options required for the integration:

phpList 2 E-mail Campaign Manager tutorial

You are prompted for your phpList database details. Enter your database host, database name, username, and password. Unless you’ve done a non-standard installation of phpList, the default entries for prefix and user table prefix will already be correct.

Under PHPList URL, enter the URL to your phpList installation. Because we are using phpList and Drupal at the same base URL, we set /lists/ (with a trailing slash) as our PHPList URL:

phpList 2 E-mail Campaign Manager tutorial

The database check illustrated in the preceding screenshot (red text reading Password is not set) is done after you save your settings. The module tries to connect to the phpList database using the details provided and will warn you if it fails.

Scroll to the bottom, ignoring the other options for now, and click on Save configuration:

phpList 2 E-mail Campaign Manager tutorial

If the database connection test was successful, the External PHPList configuration options will be collapsed into a single, clickable field, hiding them from normal view, as you configure the remaining options:

phpList 2 E-mail Campaign Manager tutorial

Attribute mapping

The module can auto-create attributes in phpList to match any attributes created in your Drupal instance. For example, you may ask your Drupal members to enter demographic information when registering and this mapping would allow these details to be transferred to the phpList.

Note that the module warns you that this mapping only works well with textline attributes and not select attributes or radio buttons. Use of this feature is not covered in this article, as it requires advanced pre-configuration of your Drupal instance:

phpList 2 E-mail Campaign Manager tutorial


Subscribe to the weekly Packt Hub newsletter. We'll send you this year's Skill Up Developer Skills Report.

* indicates required

LEAVE A REPLY

Please enter your comment!
Please enter your name here