2019-04-29 13:47:16 +02:00
|
|
|
<?php
|
2023-03-15 05:56:49 +01:00
|
|
|
|
|
|
|
require_once "util.php";
|
|
|
|
|
2019-04-29 13:47:16 +02:00
|
|
|
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') ?: '',
|
2022-09-02 15:00:12 +02:00
|
|
|
'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE')))),
|
2019-04-29 13:47:16 +02:00
|
|
|
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
|
|
|
|
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
|
2023-03-15 05:56:49 +01:00
|
|
|
'mail_smtppassword' => getFileEnv('SMTP_PASSWORD', ''),
|
2019-04-29 13:47:16 +02:00
|
|
|
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
|
|
|
|
'mail_domain' => getenv('MAIL_DOMAIN'),
|
|
|
|
);
|
|
|
|
}
|