diff options
Diffstat (limited to 'lib/private/Mail')
-rw-r--r-- | lib/private/Mail/Mailer.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php index 893a3f0be91..1189907eac9 100644 --- a/lib/private/Mail/Mailer.php +++ b/lib/private/Mail/Mailer.php @@ -44,11 +44,11 @@ use OCP\IL10N; use OCP\ILogger; use OCP\IURLGenerator; use OCP\L10N\IFactory; +use OCP\Mail\Events\BeforeMessageSent; use OCP\Mail\IAttachment; use OCP\Mail\IEMailTemplate; use OCP\Mail\IMailer; use OCP\Mail\IMessage; -use OCP\Mail\Events\BeforeMessageSent; /** * Class Mailer provides some basic functions to create a mail message that can be used in combination with @@ -292,6 +292,15 @@ class Mailer implements IMailer { $transport->setStreamOptions($streamingOptions); } + $overwriteCliUrl = parse_url( + $this->config->getSystemValueString('overwrite.cli.url', ''), + PHP_URL_HOST + ); + + if (!empty($overwriteCliUrl)) { + $transport->setLocalDomain($overwriteCliUrl); + } + return $transport; } |