PHP List is a powerful email newsletter management tool. With phpList, you can efficiently and effectively send newsletters, promotions, and updates to your subscribers. This application is ideal for keeping your customers informed about the latest developments in your company, special promotions, or any other relevant information.
phpList offers a range of advantages, such as the ability to segment your subscriber list, track the performance of your email campaigns, and personalize your messages for each recipient. Additionally, phpList is easy to use and provides an intuitive interface that allows you to create and send emails quickly and easily.
Below you will find the steps to use phpList and make the most of this powerful email marketing tool.
First, we need to configure the application to be able to send messages
- SMTP Configuration:
Edit the `config/config.php` file to configure sending via SMTP. Follow these steps:
- Find the following lines:define('PHPMAILERHOST', '');
//$phpmailer_smtpuser = 'smtpuser';
//$phpmailer_smtppassword = 'smtppassword';
- Edit the lines as indicated:define('PHPMAILERHOST', 'localhost');
$phpmailer_smtpuser = 'email@yourdomain.com';
$phpmailer_smtppassword = 'password'; - Configure SPF, DKIM, and DMARC
Ensure your emails are sent from an authorized IP address and prevent them from being marked as spam by correctly configuring SPF, DKIM, and DMARC records. These records increase the authenticity of your emails and are essential for your domain's reputation. Make sure to configure them correctly for reliable email delivery. Need help setting up the records? Contact us, and we'll be happy to assist! - Batch Configuration
Edit `config/config.php` again to split the sending into batches and avoid restriction issues.
- Find the following lines:define('MAILQUEUE_BATCH_SIZE', 0);
define('MAILQUEUE_BATCH_PERIOD', 3600);
define('MAILQUEUE_THROTTLE', 0);
- Edit the lines as indicated:define('MAILQUEUE_BATCH_SIZE', 500); # NUMBER OF EMAILS SENT PER HOUR
define('MAILQUEUE_BATCH_PERIOD', 3600);
define('MAILQUEUE_THROTTLE', 0.2);
So far everything is correctly configured in the application; however, sending emails to large lists can become complicated when it comes to handling them manually because the process requires you to keep the tab open in your browser, which can be inconvenient and lead to computer freezes.
To avoid this problem and ensure efficient email delivery, we can turn to an automated solution using cronjobs.
Cronjobs are a powerful tool that allows you to schedule tasks to run automatically at specific intervals. In this case, we will use a cronjob to have the server automatically process the email sending queue in phpList, without the need for you to keep the tab open in your browser.
The cronjob command we need to use is as follows:
0 * * * * /opt/alt/php81/usr/bin/php -q /home/USERNAME/public_html/admin/index.php -pprocessqueue -c/home/USERNAME/public_html/config/config.php >/dev/null
This command is responsible for executing a PHP script on the server, which processes the email sending queue in phpList.
Below you will find the breakdown of the command:
- 0 * * * *: This indicates the frequency of cronjob execution. In this case, the cronjob will run every hour at minute zero (i.e., at the beginning of each hour)
- /opt/alt/php81/usr/bin/php: This is the path to the PHP executable on the server
- -q /home/USERNAME/public_html/admin/index.php: This is the path to the phpList script that processes the email sending queue
- -pprocessqueue: This is the parameter that instructs the script to process the email sending queue
- -c/home/USERNAME/public_html/config/config.php: This is the path to the phpList configuration file
- >/dev/null: This redirects the command output to /dev/null, meaning that no command output messages will be displayed.
By setting up this cronjob on your account, you will ensure that the email sending queue in phpList is processed automatically and efficiently, without the need for you to be present to keep the tab open in your browser.
This will allow you to save time and resources, and ensure that your emails reach your recipients in a timely manner without interruptions.
BOUNCE HANDLING
Once the emails have been sent, it is essential to process bounces efficiently to maintain a clean and updated contact list.
Removing failed records ensures that messages are only sent to valid email addresses, improving server deliverability and reputation.
To achieve this process effectively, it is essential to configure bounce handling properly, a task we will address in detail in the following paragraphs. Optimal configuration will not only facilitate the identification and removal of bounces but also optimize communication flow with subscribers.
Identify the following variables in your configuration file and adjust them according to your server
> $message_envelope = 'sender_email@domain.com';
> $bounce_protocol = 'pop';
> define('MANUALLY_PROCESS_BOUNCES', 1);
> $bounce_mailbox_host = 'hostname.com';
> $bounce_mailbox_user = 'sender_email@domain.com';
> $bounce_mailbox_password = '*******';
> $bounce_mailbox_port = '110/pop3/notls';
> $bounce_mailbox = '/pop3';
> $bounce_mailbox_purge = 1;
> $bounce_mailbox_purge_unprocessed = 1;
> $bounce_unsubscribe_threshold = 5;
> define('REPORT_DELETED_BOUNCES', 0);
> $bounce_mailbox_name = 'INBOX'; // Folder where bounces will be searched, recommended "Inbox"
> $bounce_mailbox_maximum =
100000;
> $bounce_rules_batch_size = 50;
Effective bounce management in PHPList is essential to maintain an updated email list and ensure effective communication with subscribers. By processing and removing failed records, the efficiency of the email service is improved, and server reputation problems are avoided.
Throughout this article, we have emphasized the importance of proper configuration for handling bounces and provided clear guidelines to achieve this.
By implementing these practices, users can maintain a clean list and optimize their email campaigns with PHPList.