Skip to content

Commit

Permalink
fix: increase default SMTP timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Larch <[email protected]>
  • Loading branch information
miaulalala committed Oct 17, 2024
1 parent 3c4caff commit e7e62a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/SMTP/SmtpClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/SMTP/SmtpClientFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit e7e62a3

Please sign in to comment.