diff --git a/lib/private/Mail/Message.php b/lib/private/Mail/Message.php index 5de41c4e03495..bbd97d26bf068 100644 --- a/lib/private/Mail/Message.php +++ b/lib/private/Mail/Message.php @@ -225,6 +225,14 @@ public function getPlainBody(): string { public function setHtmlBody(string $body): IMessage { if (!$this->plainTextOnly) { $this->symfonyEmail->html($body); + + if (str_contains($body, 'cid:logo')) { + $themingDefaults = \OCP\Server::get(\OCP\Defaults::class); + $logoImage = $themingDefaults->getLogoImage(); + if ($logoImage !== null) { + $this->attachInline($logoImage['content'], 'logo', $logoImage['mimeType']); + } + } } return $this; }