Skip to content

fix(mail): attach inline logo for manual HTML bodies - #64959

Open
shrikargs7-cloud wants to merge 1 commit into
nextcloud:masterfrom
shrikargs7-cloud:fix-email-logo-regression
Open

shrikargs7-cloud wants to merge 1 commit into
nextcloud:masterfrom
shrikargs7-cloud:fix-email-logo-regression

Conversation

@shrikargs7-cloud

@shrikargs7-cloud shrikargs7-cloud commented Sep 30, 2026 •

Copy link
Copy Markdown

Description

Automatically attach the cid:logo inline image if an app bypasses useTemplate() 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\Defaults API endpoint and resolve the regression.

Related Issue

Fixes #64957

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

@shrikargs7-cloud
shrikargs7-cloud requested a review from a team as a code owner September 30, 2026 18:58
@shrikargs7-cloud
shrikargs7-cloud requested review from Altahrim, CarlSchwan, leftybournes and salmart-dev and removed request for a team September 30, 2026 18:58
@shrikargs7-cloud
shrikargs7-cloud force-pushed the fix-email-logo-regression branch from f55d676 to 00ed23d Compare September 30, 2026 19:38

@susnux susnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the pull request template - including proper conventional commit message.
Otherwise some general comments:

Comment thread lib/private/Mail/Message.php Outdated
Comment thread lib/private/Mail/Message.php Outdated
Comment thread lib/private/Mail/Message.php Outdated
@shrikargs7-cloud
shrikargs7-cloud force-pushed the fix-email-logo-regression branch from 00ed23d to 9597ae5 Compare October 1, 2026 10:16
@shrikargs7-cloud shrikargs7-cloud changed the title Fix missing embedded logo in emails sent without useTemplate fix(mail): attach inline logo for manual HTML bodies Oct 1, 2026
@shrikargs7-cloud

shrikargs7-cloud commented Oct 1, 2026 via email

Copy link
Copy Markdown
Author

@salmart-dev salmart-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread lib/private/Mail/Message.php Outdated
$this->symfonyEmail->html($body);

if (str_contains($body, 'cid:logo')) {
$themingDefaults = \OCP\Server::get(\OCP\Theming\IThemingDefaults::class);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interface does not exist

Fixes nextcloud#64957

Signed-off-by: Shrikar <shrikargs7@gmail.com>
Assisted-by: Antigravity:gemini-2.5-pro
@shrikargs7-cloud
shrikargs7-cloud force-pushed the fix-email-logo-regression branch from 9597ae5 to defbbf8 Compare October 2, 2026 04:40

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: logo missing from emails from the guest app

3 participants