diff --git a/doc/admin.md b/doc/admin.md index d85b17efee..9f64f15383 100644 --- a/doc/admin.md +++ b/doc/admin.md @@ -40,7 +40,7 @@ Depending on your mail host, it may be necessary to increase your IMAP and/or SM ``` #### SMTP timeout ```php -'app.mail.smtp.timeout' => 2 +'app.mail.smtp.timeout' => 20 ``` #### Sieve timeout ```php diff --git a/lib/SMTP/SmtpClientFactory.php b/lib/SMTP/SmtpClientFactory.php index 2a2d954254..3d63195fba 100644 --- a/lib/SMTP/SmtpClientFactory.php +++ b/lib/SMTP/SmtpClientFactory.php @@ -60,7 +60,7 @@ public function create(Account $account): Horde_Mail_Transport { 'port' => $mailAccount->getOutboundPort(), 'username' => $mailAccount->getOutboundUser(), 'secure' => $security === 'none' ? false : $security, - 'timeout' => (int)$this->config->getSystemValue('app.mail.smtp.timeout', 5), + 'timeout' => (int)$this->config->getSystemValue('app.mail.smtp.timeout', 20), 'context' => [ 'ssl' => [ 'verify_peer' => $this->config->getSystemValueBool('app.mail.verify-tls-peer', true), diff --git a/tests/Unit/SMTP/SmtpClientFactoryTest.php b/tests/Unit/SMTP/SmtpClientFactoryTest.php index 923ac45231..456cb0c98f 100644 --- a/tests/Unit/SMTP/SmtpClientFactoryTest.php +++ b/tests/Unit/SMTP/SmtpClientFactoryTest.php @@ -70,7 +70,7 @@ public function testSmtpTransport() { ->willReturnMap([ ['app.mail.transport', 'smtp', 'smtp'], ['debug', false, false], - ['app.mail.smtp.timeout', 5, 2], + ['app.mail.smtp.timeout', 20, 2], ]); $this->config->expects($this->any()) ->method('getSystemValueBool')