Setting up PHPList

PHPlist (3.3.1 applies to this article) is awesome but can be a bit tricky to set up…

First check if your host allows connections to external mail ports from php. Some do some don’t. Gandi.net, the one we use does but only through port 465.

Secondly, if you need automation (ie send autoresponder a few days later) then check you have the capability to set cron jobs on your host. Again, Gandi does, many don’t.

Then we start:

  1. Upload the phplist zip to your domain’s directory.
  2. Then ssh into your hosting and expand the phplist zip
  3. copy out public_tml/lists to the domain’s directory
  4. go into mysql and create a user and a database then add all priviledges to that user for that db
  5. set the top section of lists/config.php file to something like the below

We use mailjet.com for ftp in this example.



// what is your Mysql database server hostname
$database_host = 'localhost';

// what is the name of the database we are using
$database_name = 'dbname';

// what user has access to this database
$database_user = 'dbuser';

// and what is the password to login to control the database
$database_password = 'dbpword';

// if you have an SMTP server, set it here. Otherwise it will use the normal php mail() function
//# if your SMTP server is called "smtp.mydomain.com" you enter this below like this:
//#
//#     define("PHPMAILERHOST",'smtp.mydomain.com');

define('PHPMAILERHOST', 'get this from mailjet');
define('PHPMAILERPORT', 465);
define('PHPMAILER_SECURE', 'ssl');

$phpmailer_smtpuser = 'get this from mailjet';
$phpmailer_smtppassword = 'get this from mailjet';

// if TEST is set to 1 (not 0) it will not actually send ANY messages, but display what it would have sent
// this is here, to make sure you edited the config file and mails are not sent "accidentally"
// on unmanaged systems

define('TEST', 0);

Then create a mailbox in your hosting panel bounces@ whateveryourdomain is. And fill in its pop details to the lower section of the config.

Log into yourdomain.com/lists/admin and click initialise database. Fill in your details and test by sending a campaign.

Make sure the from address matches whatever you put in mailjet.

Leave a Reply

Your email address will not be published. Required fields are marked *