Page MenuHomePhabricator

D8806.id.diff
No OneTemporary

D8806.id.diff

diff --git a/conf/default.conf.php b/conf/default.conf.php
--- a/conf/default.conf.php
+++ b/conf/default.conf.php
@@ -314,6 +314,7 @@
'phpmailer.mailer' => 'smtp',
'phpmailer.smtp-host' => '',
'phpmailer.smtp-port' => 25,
+ 'phpmailer.smtp-timeout' => 10,
// When using PHPMailer with SMTP, you can set this to one of "tls" or "ssl"
// to use TLS or SSL. Leave it blank for vanilla SMTP. If you're sending
diff --git a/src/applications/config/option/PhabricatorPHPMailerConfigOptions.php b/src/applications/config/option/PhabricatorPHPMailerConfigOptions.php
--- a/src/applications/config/option/PhabricatorPHPMailerConfigOptions.php
+++ b/src/applications/config/option/PhabricatorPHPMailerConfigOptions.php
@@ -26,6 +26,8 @@
->setDescription(pht('Host for SMTP.')),
$this->newOption('phpmailer.smtp-port', 'int', 25)
->setDescription(pht('Port for SMTP.')),
+ $this->newOption('phpmailer.smtp-timeout', 'int', 10)
+ ->setDescription(pht('Timeout in seconds for SMTP.')),
// TODO: Implement "enum"? Valid values are empty, 'tls', or 'ssl'.
$this->newOption('phpmailer.smtp-protocol', 'string', null)
->setSummary(pht('Configure TLS or SSL for SMTP.'))
diff --git a/src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php b/src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php
--- a/src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php
+++ b/src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php
@@ -23,6 +23,8 @@
$this->mailer->IsSMTP();
$this->mailer->Host = PhabricatorEnv::getEnvConfig('phpmailer.smtp-host');
$this->mailer->Port = PhabricatorEnv::getEnvConfig('phpmailer.smtp-port');
+ $this->mailer->Timeout =
+ PhabricatorEnv::getEnvConfig('phpmailer.smtp-timeout');
$user = PhabricatorEnv::getEnvConfig('phpmailer.smtp-user');
if ($user) {
$this->mailer->SMTPAuth = true;
diff --git a/src/docs/user/configuration/configuring_outbound_email.diviner b/src/docs/user/configuration/configuring_outbound_email.diviner
--- a/src/docs/user/configuration/configuring_outbound_email.diviner
+++ b/src/docs/user/configuration/configuring_outbound_email.diviner
@@ -91,6 +91,8 @@
- **phpmailer.mailer**: set to "smtp".
- **phpmailer.smtp-host**: set to hostname of your smtp server.
- **phpmailer.smtp-port**: set to port of your smtp server.
+ - **phpmailer.smtp-timeout**: set to the timeout used for communicating with
+ your smtp server.
- **phpmailer.smtp-user**: set to your username used for authentication.
- **phpmailer.smtp-password**: set to your password used for authentication.

File Metadata

Mime Type
text/plain
Expires
Aug 11 2025, 11:46 PM (16 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
9102916
Default Alt Text
D8806.id.diff (2 KB)

Event Timeline