Chapter 5. List, User, and Administrator Management

In the previous chapters, we've established our mailing list system and made it possible for our members to subscribe to. While phpList automatically takes care of many of the routine and repeatable parts of mailing list management, such as subscription, unsubscription, bounce processing, and so on, it remains the administrator's role to manage users, create lists, and possibly delegate some tasks to other administrators.

In this chapter, you'll learn to:

  • Manage users either individually or in bulk
  • Manage lists and their associated users
  • Manage administrators and permission levels

Individual user management

Let's start with creating some users. Click on the users link in the right-hand navigation panel or under the List and user functions heading to go to the user management page:

Individual user management

You are presented with the list of users (if there are too many users to display, phpList will prompt you to search for a subset of users). We have already added a user in the first chapter, so let's edit that user. Click on the user's e-mail address to edit their account:

Individual user management

Updating a user's details and list memberships (as the user)

phpList provides a unique URL for each user to update their details, including their e-mail address, list memberships, and any other attributes you've defined. This URL can be added to the footer of your messages using the variable substitutions discussed in the following chapter.

To see what the user would see on this page, click on the update page link:

Updating a user's details and list memberships (as the user)

You are redirected to a URL specific to this user's preferences. (This is the same URL the user would be directed to if they were to click their preferences link in an e-mail, to modify their subscription or formatting details):

Updating a user's details and list memberships (as the user)

Unsubscribing a user (as the user)

Use your browser's back button to return to the User Details administration page and click the unsubscribe page link:

Unsubscribing a user (as the user)

Like the update page, this is a unique URL that this user can visit to unsubscribe from all lists:

Unsubscribing a user (as the user)

Examining a user's history (as administrator)

Use the history link to examine the user's history:

Examining a user's history (as administrator)

The user's history page shows every event associated with this user including their original subscription, every e-mail they've received (you can click the message ID to view it), as well as bounces, unsubscriptions, and so on:

Examining a user's history (as administrator)

Updating a user's details (as admin)

Of course, as the administrator, you don't need to use the update or unsubscribe link to manage the user—you can perform individual user operations from the user detail page. From this page, you can:

  1. Confirm/unconfirm a user (users are only confirmed when they double option and only confirmed users receive e-mail).
  2. Disable a user.
  3. Alter the user's RSS frequency setting (we'll cover this in Chapter 9,Advanced Features
  4. Alter the user's HTML / plain text preference.
  5. Alter any defined attributes.

    Note

    For all of the true/false values (that is, confirmation status or HTML preference), phpList expects you to enter 0 for false and 1 for true.

Bulk user management

We've covered managing an individual user. phpList can also perform bulk actions on users, such as importing / exporting, moving between lists, and reconciling.

For bulk user management, click on the manage users link in the right-hand navigation panel:

Bulk user management

Importing users

Click on the import users link to display the options for importing users:

Importing users

Importing a simple list

The most common means of importing users is the uploading of a plain text file containing a list of e-mail addresses.

Click on the import emails with the same values for attributes link:

Importing a simple list

Let's assume that we want to import a list of customer's e-mail addresses from a text file named customers_simple.txt containing the following:

We'll enter the following options on the import page:

  1. Test import first (make sure our file syntax is correct).
  2. Send all subscribers a notification giving them the opportunity to confirm their subscription (unconfirmed subscribers will not receive messages).
  3. Set all subscribers to HTML e-mail with a standard Country attribute
    Importing a simple list

The test process shows that the e-mails will be imported one-per-line as we expect. Click on the back link to return to the import page:

Importing a simple list

This time leave Test output unchecked, re-select your file and subscription options, and click on import. Instead of seeing each e-mail address listed on the success page (there could be tens of thousands after all), you're simply shown a total of the successful imports:

Importing a simple list

Importing a complex list

You might have a more complex list that includes customer names and surnames, as well as their home town. Let's assume we want to import a list of customer details we've exported from another database, which includes their e-mail addresses, first and last name, and home town. We have the file customers_complex.csv in the .CSV (comma-separated values) format:

email,first name, last name, hometown
[email protected],Clark,Kent, Krypton
[email protected],Lois,Lane,Metropolis
[email protected],Jimmy,Olsen,Metropolis
[email protected],Bruce,Wayne,Gotham City
[email protected],Peter,Parker,New York
[email protected],Lana,Lang,Smallville
[email protected],Bruce,Banner,Dayton

Note the column names are defined on the first line and that the e-mail column has to be named email.

phpList can import complex lists using the import emails with the different values for attributes link:

Importing a complex list

There are more options to choose from when importing e-mails with different values for attributes. We now have options regarding what to do with conflicts, duplicates, or invalid addresses. Fortunately, the defaults will do fine for our import. Note that we haven't created the first name, last name, or hometown attributes, but as they will be one of the fields we import, phpList will automatically create them as text fields.

Remember to specify your field separator—in this example, we are using the CSV format, so a comma separates our values. Run an input with Test output checked first to confirm that our syntax and options are correct:

Importing a complex list

After clicking on the Import button, because there are no matching, pre-existing attributes, phpList will prompt you to create a new attribute for each column which it's imported, or to select from the list of existing attributes. Choose Create new one and click on Continue:

Importing a complex list

phpList will show you which attributes have been identified, and which columns from your file should be mapped to these attributes Once you're happy with the mapping, click on confirm import to continue:

Importing a complex list

In this case, as these e-mail addresses already existed in the database from the simple import, phpList updated the user records with the new attribute data that was imported:

Importing a complex list

Examining one of the imported users would determine that we've successfully imported not only the e-mail address, but also the additional values, which can later be used to personalize their e-mails:

Importing a complex list

Reconciling users

When managing large numbers of users, it can be very helpful to run batch operations to perform bulk-updates on all (or a subset of) users.

To use the user reconciliation tools, click on the reconcile users link in the manage users page:

Reconciling users

Many of the functions available are intended to address minor import issues. Here's a brief breakdown of what's possible:

  1. Delete all users who are not subscribed to any list:

    Either in testing or importing, you may have accidentally imported users, but not assigned them to any lists. This option will get rid of any of these "orphaned" users.

  2. Find users who have an invalid email:

    phpList has a function that checks whether an e-mail address is valid (that is, it can't contain spaces and has to contain an @ sign). This option will identify all users whose e-mail address is invalid.

  3. Make sure that all users have a unique ID:

    Under certain circumstances, users can be imported with the same unique ID. This option identifies these users and creates unique IDs for them

  4. Mark all users with an invalid email as unconfirmed:

    Instead of having phpList warn you every time it tries to send e-mails to invalid addresses, you may prefer to have these address marked as unconfirmed, so that they will not receive any further e-mails.

  5. Delete users who have an invalid email:

    If you choose not to bother with the invalid users, you could delete them altogether, keeping your user database free of clutter.

  6. Mark all users to receive HTML:

    If you don't want to offer your users the option to choose between HTML and text e-mails, you could bulk-change all users to receive HTML e-mails.

  7. Mark all users to receive text:

    If you don't want to offer your users the option to choose between HTML and text e-mails, you could bulk-change all users to receive text e-mails.

  8. Mark all users as confirmed:

    Perhaps you accidentally imported 10,000 e-mails as unconfirmed. Use this option to bulk-confirm all your users.

  9. To try to (automatically) fix emails for users who have an invalid email:

    phpList can try to automatically fix invalid e-mails by removing spaces and fixing common errors.

  10. Remove stale entries from the database:

    In addition to removing invalid users, this will also clean up some of the database tables.

  11. Merge duplicate users:

    You may have imported a user twice or once with a valid e-mail and once with an invalid e-mail that you've later fixed. This option will try to merge any duplicate users.

You also have the option at the bottom of the page to either delete or send a subscription reminder to any unconfirmed users who signed up during a particular date range.

Exporting users

phpList's options for exporting users are quite straightforward. Either on the user management page (all users) or from the member's page of a particular list, there is a link to download users as a csv file.

All users

Using the list of all users, you can globally export all your users details, across all lists

All users

Specific list

Using a specific list's members page, you can export only the members of that list

Specific list

After clicking on the download link, you're prompted to select a date range and optionally choose which attributes will be exported. All the standard attributes (Email, HTML preference, and so on) will be optional as well as any custom attributes defined:

Specific list

Once you've clicked on Download, a text file will be downloaded which can be imported into a spreadsheet application.

Note

Note that while phpList's download links refer to downloading a CSV (comma-separated values), file the fields in the file will actually be delimited with tabs as opposed to commas.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.239.44