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:
- Create an email address in the Dreamhost panel, such as admin@yourdomain.tld
- Open notepad or another basic text editor and create a new file called config.inc.php
- Add the below code inside that new file:
- Edit the admin@yourdomain.tld with your email address in two places and edit YourPassword with the password you created in Dreamhost.
- Save the file and upload it to your site under the /local/config/ folder
<?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';
?>
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:
- Dreamhost SMTP port and protocol info in Step 3
- A collection of forum posts about a non-existent plugin.
- The piwigo source code for mail configuration options.