phplist - Process campaigns using a CRON (phplist v3)

PHPList is an amazing piece of software if your looking to send mailshot from your server, what makes it even better is the fact it's 100% free!

One of the biggest annoyances though is when it comes to processing your campaigns, by default this is done after you have created your campaign by clicking "process queue". The problem with this method is that it's all processed from within your browser window, so if you have a particularly large processing queue you will have to leave your browser window open while it processes and sends each chunk of emails.

If your a power user such as myself this is even more difficult because you will have set usage limits for how many emails to send per batch per hour so that SPAM services do not freak out and think you are sending out straight up SPAM (Hopefully you are not sending out SPAM!).

However it is very easy to setup a CRON on your server to perform processing in the background, you will never need to click "process queue" any more and leave your browser window open while the queue is processed. With the below code everything will be sorted for you, PHPList will send emails as and when it can depending on your rules and you can just focus on writing up your emails and adding them to the queue.

Open up your CRON page and add the following code, set the cron to run every 5 minutes (or if you know what your doing you can increase this time period depending on your processing rules, for instance if your only sending 30 max per hour and processing 10 in each batch you can run the cron every 20 minutes).

You will need to replace the URL with the URL to your PHPList installation, and change the username and password to your main admin username and password.

/usr/bin/curl -s 'http://MYURL/phplist/admin/index.php?page=pageaction&action=processqueue&login=admin&password=admin'

The code above will use CURL so make sure this is installed on your server, CURL will download and instantly delete the file, it will basically perform the action you used to perform in the browser.

Facebooktwitterredditpinterestlinkedinmail
Author: Dean WilliamsI'm a Web Developer, Graphics Designer and Gamer, this is my personal site which provides PHP programming advice, hints and tips

Post Tags:
, , ,
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments