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:
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:
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:
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:
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):
Use your browser's back button to return to the User Details administration page and click the unsubscribe page link:
Like the update page, this is a unique URL that this user can visit to unsubscribe from all lists:
Use the history link to examine the user's history:
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:
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:
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:
Click on the import users link to display the options for importing users:
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:
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:
[email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
We'll enter the following options on the import page:
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:
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:
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:
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:
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:
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:
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:
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:
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:
Many of the functions available are intended to address minor import issues. Here's a brief breakdown of what's possible:
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.
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.
Under certain circumstances, users can be imported with the same unique ID. This option identifies these users and creates unique IDs for them
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.
If you choose not to bother with the invalid users, you could delete them altogether, keeping your user database free of clutter.
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.
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.
Perhaps you accidentally imported 10,000 e-mails as unconfirmed. Use this option to bulk-confirm all your users.
phpList can try to automatically fix invalid e-mails by removing spaces and fixing common errors.
In addition to removing invalid users, this will also clean up some of the database tables.
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.
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.
Using a specific list's members page, you can export only the members of that 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:
Once you've clicked on Download, a text file will be downloaded which can be imported into a spreadsheet application.
18.218.238.134