diff --git a/.config/smtp.config.php b/.config/smtp.config.php index 66a2ef7e8..43e87c1d1 100644 --- a/.config/smtp.config.php +++ b/.config/smtp.config.php @@ -4,6 +4,7 @@ 'mail_smtpmode' => 'smtp', 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtptimeout' => getenv('SMTP_TIMEOUT') ?: 30, 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', diff --git a/30/apache/config/smtp.config.php b/30/apache/config/smtp.config.php index 66a2ef7e8..43e87c1d1 100644 --- a/30/apache/config/smtp.config.php +++ b/30/apache/config/smtp.config.php @@ -4,6 +4,7 @@ 'mail_smtpmode' => 'smtp', 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtptimeout' => getenv('SMTP_TIMEOUT') ?: 30, 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', diff --git a/30/fpm-alpine/config/smtp.config.php b/30/fpm-alpine/config/smtp.config.php index 66a2ef7e8..43e87c1d1 100644 --- a/30/fpm-alpine/config/smtp.config.php +++ b/30/fpm-alpine/config/smtp.config.php @@ -4,6 +4,7 @@ 'mail_smtpmode' => 'smtp', 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtptimeout' => getenv('SMTP_TIMEOUT') ?: 30, 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', diff --git a/30/fpm/config/smtp.config.php b/30/fpm/config/smtp.config.php index 66a2ef7e8..43e87c1d1 100644 --- a/30/fpm/config/smtp.config.php +++ b/30/fpm/config/smtp.config.php @@ -4,6 +4,7 @@ 'mail_smtpmode' => 'smtp', 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtptimeout' => getenv('SMTP_TIMEOUT') ?: 30, 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', diff --git a/31/apache/config/smtp.config.php b/31/apache/config/smtp.config.php index 66a2ef7e8..43e87c1d1 100644 --- a/31/apache/config/smtp.config.php +++ b/31/apache/config/smtp.config.php @@ -4,6 +4,7 @@ 'mail_smtpmode' => 'smtp', 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtptimeout' => getenv('SMTP_TIMEOUT') ?: 30, 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', diff --git a/31/fpm-alpine/config/smtp.config.php b/31/fpm-alpine/config/smtp.config.php index 66a2ef7e8..43e87c1d1 100644 --- a/31/fpm-alpine/config/smtp.config.php +++ b/31/fpm-alpine/config/smtp.config.php @@ -4,6 +4,7 @@ 'mail_smtpmode' => 'smtp', 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtptimeout' => getenv('SMTP_TIMEOUT') ?: 30, 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', diff --git a/31/fpm/config/smtp.config.php b/31/fpm/config/smtp.config.php index 66a2ef7e8..43e87c1d1 100644 --- a/31/fpm/config/smtp.config.php +++ b/31/fpm/config/smtp.config.php @@ -4,6 +4,7 @@ 'mail_smtpmode' => 'smtp', 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtptimeout' => getenv('SMTP_TIMEOUT') ?: 30, 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', diff --git a/32/apache/config/smtp.config.php b/32/apache/config/smtp.config.php index 66a2ef7e8..43e87c1d1 100644 --- a/32/apache/config/smtp.config.php +++ b/32/apache/config/smtp.config.php @@ -4,6 +4,7 @@ 'mail_smtpmode' => 'smtp', 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtptimeout' => getenv('SMTP_TIMEOUT') ?: 30, 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', diff --git a/32/fpm-alpine/config/smtp.config.php b/32/fpm-alpine/config/smtp.config.php index 66a2ef7e8..43e87c1d1 100644 --- a/32/fpm-alpine/config/smtp.config.php +++ b/32/fpm-alpine/config/smtp.config.php @@ -4,6 +4,7 @@ 'mail_smtpmode' => 'smtp', 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtptimeout' => getenv('SMTP_TIMEOUT') ?: 30, 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', diff --git a/32/fpm/config/smtp.config.php b/32/fpm/config/smtp.config.php index 66a2ef7e8..43e87c1d1 100644 --- a/32/fpm/config/smtp.config.php +++ b/32/fpm/config/smtp.config.php @@ -4,6 +4,7 @@ 'mail_smtpmode' => 'smtp', 'mail_smtphost' => getenv('SMTP_HOST'), 'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25), + 'mail_smtptimeout' => getenv('SMTP_TIMEOUT') ?: 30, 'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '', 'mail_smtpauth' => getenv('SMTP_NAME') && (getenv('SMTP_PASSWORD') || getenv('SMTP_PASSWORD_FILE')), 'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN', diff --git a/README.md b/README.md index 3be70217f..2f84cd6e9 100644 --- a/README.md +++ b/README.md @@ -259,6 +259,7 @@ To use an external SMTP server, you have to provide the connection details. Note - `SMTP_HOST` (not set by default): The hostname of the SMTP server. - `SMTP_SECURE` (empty by default): Set to `ssl` to use SSL, or `tls` to use STARTTLS. - `SMTP_PORT` (default: `465` for SSL and `25` for non-secure connections): Optional port for the SMTP connection. Use `587` for an alternative port for STARTTLS. +- `SMTP_TIMEOUT` (default: `30`): SMTP timeout in seconds - `SMTP_AUTHTYPE` (default: `LOGIN`): The method used for authentication. Use `PLAIN` if no authentication is required. - `SMTP_NAME` (empty by default): The username for the authentication. - `SMTP_PASSWORD` (empty by default): The password for the authentication.