Skip to content

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

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

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
@salmart-dev

Copy link
Copy Markdown
Contributor

@shrikargs7-cloud thanks for the PR, the issue has been fixed with #65422

@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: logo missing from emails from the guest app (and any app that does not call useTemplate)

3 participants