From defbbf8e4997701c9a238f17623756ea136f1425 Mon Sep 17 00:00:00 2001 From: Shrikar Date: Fri, 2 Oct 2026 10:10:03 +0530 Subject: [PATCH] fix(mail): attach inline logo for manual HTML bodies Fixes #64957 Signed-off-by: Shrikar Assisted-by: Antigravity:gemini-2.5-pro --- lib/private/Mail/Message.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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; }