Piwigo Logo

Piwigo: Configure Custom SMTP on Dreamhost

Piwigo is open-source software for sharing image galleries easily. Installing it on Dreamhost (I’m using a VPS but any type of hosting works) was super easy, but by default any emails sent would have Mail System Delivery Failure due to email security problems.

Luckily, the solution was to create an email account in Dreamhost and configure SMTP in Piwigo. Here are the steps in a new installation:

  1. Create an email address in the Dreamhost panel, such as admin@yourdomain.tld
  2. Open notepad or another basic text editor and create a new file called config.inc.php
  3. Add the below code inside that new file:

  4. <?php
    $conf['mail_sender_email'] = 'admin@yourdomain.tld';
    $conf['smtp_user'] = 'admin@yourdomain.tld';
    $conf['smtp_password'] = 'YourPassword';
    $conf['smtp_host'] = 'smtp.dreamhost.com:465';
    // 'ssl' or 'tls'
    $conf['smtp_secure'] = 'ssl';

  5. Edit the admin@yourdomain.tld with your email address in two places and edit YourPassword with the password you created in Dreamhost.
  6. Save the file and upload it to your site under the /local/config/ folder

To test it, you can use the Forgot Password feature on the Login screen to get a quick email sent. I verified this works on Piwigo v13.8.0. The following resources were used to piece together these up-to-date instructions:

Leave a Reply

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