To properly handle bouncebacks (emails that can't be delivered to your users) in PHPlist a quick change to your PHPlist configuration file will need to be made. This is the first part of handling bouncebacks in PHPlist. We will walk through the second part, processing bounces in PHPlist after we send a message to our mailing list.
When you initially installed PHPlist through Fantastico, you created a special email address for handling bounceback emails. This is the email address we will need to add to our configuration file in order to process bouncebacks in PHPlist.
- Begin by logging into cPanel
- Using the cPanel File Manager, navigate to the config directory inside the directory where you installed PHPlist. In our example, we installed PHPlist to the newsletter subdirectory inside our main domain's document root so we will go to public_html/newsletter/config
- To open the config.php and edit the file, either right click the file and select one of the edit options (Edit or Code Editor) or select the file and click one of the edit options at the top of the screen. If you receive an encoding check pop-up window, make sure utf-8 is selected and click the Edit button in that window.
- Find the following line in the config.php file:
# $message_envelope = 'listbounces@yourdomain';
- Remove the # sign at the beginning of the line and change the email address to your email address you created for receiving bounce back messages. Using our example, our special email address is
$message_envelope = '
- You can edit the following line if you want to increase or decrease the bounce threshold for your list. The bounce threshold is the number of consecutive bounces that need to occur before a user is marked as unconfirmed. This will not delete the user from the list, it will simply unconfirm them and they will not be sent any future messages unless they are reset to confirmed in their user details in PHPlist.
$bounce_unsubscribe_threshold = 5;
- Save and close the file. Note: other tutorials may mention changing the $bounce_mailbox_host, $bounce_mailbox_user, and $bounce_mailbox_password lines but these were filled in for us during the Fantastico installation process. We shouldn't need to make any changes there.