Bulk unsubscribe email addresses from PHPList using custom PHP script

I had a small task to unsubscribe email addresses of specific countries from our company mailing list as we would not be able to do business with them due to change in policy.

We use PHPList as our mailing list software and unfortunately there was no option in its panel to unsubscribe email addresses in bulk. So I went about investigating the tables which are updated when a recipient unsubscribes himself from the mailing list.

After testing I found that the following 4 tables were the ones which needed to be updated for the email addresses to be unsubscribed.

  1. phplist_user_user
  2. phplist_user_blacklist
  3. phplist_user_blacklist_data
  4. phplist_listuser

I created a script which reads the email addresses one by one from a CSV file and updated the above tables.

You can download the PHP script which unsubscribes the email addresses in bulk from PHPList

Please follow and like us:
error

Be the first to comment

Leave a Reply

Your email address will not be published.