diff options
author | Rodrigo <hi@rodrigoaguilera.net> | 2019-04-29 13:47:16 +0200 |
---|---|---|
committer | J0WI <J0WI@users.noreply.github.com> | 2019-04-29 13:47:16 +0200 |
commit | dc04397618084647989ab75608a3c90d396de6b2 (patch) | |
tree | 8231ceda322fc21fd0fbe5243f4db130efcaa870 /14.0/fpm-alpine/config | |
parent | da36b3afe64460f96847efe9d2eaa72d7f2a5a24 (diff) |
Set SMTP via environment vars. (#698)
* Set SMTP via environment vars.
Signed-off-by: Rodrigo Aguilera <hi@rodrigoaguilera.net>
* Add SMTP instructions to the readme.
Signed-off-by: Rodrigo Aguilera <hi@rodrigoaguilera.net>
* Run update.sh for 16.0 release.
Signed-off-by: Rodrigo Aguilera <hi@rodrigoaguilera.net>
Diffstat (limited to '14.0/fpm-alpine/config')
-rw-r--r-- | 14.0/fpm-alpine/config/smtp.config.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/14.0/fpm-alpine/config/smtp.config.php b/14.0/fpm-alpine/config/smtp.config.php new file mode 100644 index 00000000..59f1eaa1 --- /dev/null +++ b/14.0/fpm-alpine/config/smtp.config.php @@ -0,0 +1,15 @@ +<?php +if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) { + $CONFIG = array ( + 'mail_smtpmode' => 'smtp', + 'mail_smtphost' => getenv('SMTP_HOST'), + 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', + 'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'), + 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', + 'mail_smtpname' => getenv('SMTP_NAME') ?: '', + 'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '', + 'mail_from_address' => getenv('MAIL_FROM_ADDRESS'), + 'mail_domain' => getenv('MAIL_DOMAIN'), + ); +} |