tanmng / docker-chevereto-free

Dockerfiles for various release of Chevereto Free
38 stars 26 forks source link

Mail server settings #11

Closed brentkearney closed 3 years ago

brentkearney commented 4 years ago

How do we configure the SMTP settings? The official docs say that it's in the web interface, but I do not see E-mail server settings there when logged in as the admin user.

brentkearney commented 4 years ago

Found it: var/www/html/app/install/installer.php. IMO, the SMTP settings should be passed in as environment variables, like the database ones.

brentkearney commented 4 years ago

Looks like I was wrong about installer.php. I found settings.php, and tried adding these:

$settings['email_mode'] = $_ENV['CHEVERETO_EMAIL_MODE'];
$settings['email_smtp_server_security'] = $_ENV['CHEVERETO_EMAIL_SECURITY'];
$settings['email_smtp_server_server'] = $_ENV['CHEVERETO_EMAIL_SERVER'];
$settings['email_smtp_server_port'] = $_ENV['CHEVERETO_EMAIL_PORT'];
$settings['email_smtp_server_username'] = $_ENV['CHEVERETO_EMAIL_USERNAME'];
$settings['email_smtp_server_password'] = $_ENV['CHEVERETO_EMAIL_PASSWORD'];

Along with corresponding environment variables for my SMTP server. However, I still get the message, "Could not instantiate mail function." when I try to reset a user password. How do I get mail to work?

tanmng commented 4 years ago

Hello @brentkearney . Sorry for the late reply, I didn't have notification for this enabled an only today had the chance to review this issue.

I'll launch a container for this and try using email to see if it should work

zangkaiqiang commented 4 years ago

"Could not instantiate mail function."