fix(mail): attach inline logo for manual HTML bodies - #64959
Open
shrikargs7-cloud wants to merge 1 commit into
Open
shrikargs7-cloud wants to merge 1 commit into
shrikargs7-cloud wants to merge 1 commit into
Conversation
shrikargs7-cloud
requested review from
Altahrim,
CarlSchwan,
leftybournes and
salmart-dev
and removed request for
a team
September 30, 2026 18:58
shrikargs7-cloud
force-pushed
the
fix-email-logo-regression
branch
from
September 30, 2026 19:38
f55d676 to
00ed23d
Compare
susnux
requested changes
Oct 1, 2026
susnux
left a comment
Contributor
There was a problem hiding this comment.
Please follow the pull request template - including proper conventional commit message.
Otherwise some general comments:
shrikargs7-cloud
force-pushed
the
fix-email-logo-regression
branch
from
October 1, 2026 10:16
00ed23d to
9597ae5
Compare
Author
|
*"Thanks for the feedback! I've updated the code, removed the broad
exception catch, fixed the server call, and updated the PR title to follow
conventional commits."*
…On Thu, Oct 1, 2026 at 3:39 PM Ferdinand Thiessen ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Please follow the pull request template - including proper conventional
commit message.
Otherwise some general comments:
------------------------------
In lib/private/Mail/Message.php
<#64959 (comment)>:
> @@ -225,6 +225,21 @@ public function getPlainBody(): string {
public function setHtmlBody(string $body): IMessage {
if (!$this->plainTextOnly) {
$this->symfonyEmail->html($body);
+
+ // Fix for #64957: Automatically attach the inline logo if the app
that comment to ref an issue makes no sense in production code. should
rather be in a regression test.
------------------------------
In lib/private/Mail/Message.php
<#64959 (comment)>:
> + /** @var \OCP\Theming\IThemingDefaults $themingDefaults */
+ $themingDefaults = \OC::$server->get(\OCP\Theming\IThemingDefaults::class);
doc block not needed as inferred by param.
Please do not use OC::$server but OCP\Server::get
------------------------------
In lib/private/Mail/Message.php
<#64959 (comment)>:
> + } catch (\Exception $e) {
+ // Failsafe in case ThemingDefaults is unavailable
This should rather catch the container exception - but this should also
never be the case so can be ignored.
Currently this catched far too broad
—
Reply to this email directly, view it on GitHub
<#64959?email_source=notifications&email_token=B3MASHGMYFZKSWUYL4Y54NL5RYUMJA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKMZXG44DINRRGQ42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#pullrequestreview-5377846149>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/B3MASHDYDTQKGBESZKJ35QT5RYUMJAVCNFSNUABEKJSXA33TNF2G64TZHM3DAMRUGMYTSNZ3JFZXG5LFHM2TMNJRGUZDKOJSG2QXMAQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
salmart-dev
requested changes
Oct 1, 2026
salmart-dev
left a comment
Contributor
There was a problem hiding this comment.
Given the author's profile and the code, it seems to me like this may be an automated submission. In that case, the PR is not respecting our AI Contribution policy
| $this->symfonyEmail->html($body); | ||
|
|
||
| if (str_contains($body, 'cid:logo')) { | ||
| $themingDefaults = \OCP\Server::get(\OCP\Theming\IThemingDefaults::class); |
Contributor
There was a problem hiding this comment.
The interface does not exist
Fixes nextcloud#64957 Signed-off-by: Shrikar <shrikargs7@gmail.com> Assisted-by: Antigravity:gemini-2.5-pro
shrikargs7-cloud
force-pushed
the
fix-email-logo-regression
branch
from
October 2, 2026 04:40
9597ae5 to
defbbf8
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Automatically attach the
cid:logoinline image if an app bypassesuseTemplate()and sets an HTML body containing the logo directly. Resolves the regression introduced in #62933 where emails sent by these apps were missing the logo.This PR was prepared with the assistance of an AI coding agent to quickly identify the
\OCP\DefaultsAPI endpoint and resolve the regression.Related Issue
Fixes #64957
Types of changes