Skip to content

fix: embed inline logo in guest invitation emails - #1719

Merged
skjnldsv merged 3 commits into
nextcloud:mainfrom
klaussalminenq5:patch-1
Oct 11, 2026
Merged

skjnldsv merged 3 commits into
nextcloud:mainfrom
klaussalminenq5:patch-1

Conversation

@klaussalminenq5

Copy link
Copy Markdown
Contributor

Since Nextcloud 34, EMailTemplate embeds the theming logo inline
(src="cid:logo"). The image is only attached in Message::useTemplate().

The guest invitation called setHtmlBody()/setPlainBody() directly, so
the HTML referenced cid:logo but no image part was attached, and
recipients saw a broken logo.

This switches to useTemplate() and sets the subject afterward, since
useTemplate() overwrites it with the template subject.

Tested: core "Send test email" shows the logo on the same instance;
guest invitations show a broken image without this change.

Fixes #1718

   Use IMessage::useTemplate() so inline images from EMailTemplate
   (the cid:logo theming logo since Nextcloud 34) are attached.

   Signed-off-by:Klaus Salminen klaus@andqfive.com

Signed-off-by: klaussalminenq5 <klaus@andqfive.com>
Signed-off-by: klaussalminenq5 <klaus@andqfive.com>
@klaussalminenq5

Copy link
Copy Markdown
Contributor Author

Applied this patch on a Nextcloud 34.0.4 instance with Guests 4.10.0. Invitation emails now show the inline logo and the correct subject.

@skjnldsv skjnldsv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! Confirmed: the logo became an inline cid:logo attachment in server 34, and only useTemplate() attaches it.

Small nit, not blocking: the setSubject($subject) before useTemplate() is now dead, since useTemplate() overwrites it. You could set it on the template instead ($emailTemplate->setSubject($subject)) and drop both message calls.

@skjnldsv skjnldsv added bug Something isn't working 3. to review Waiting for reviews labels Oct 11, 2026
useTemplate() overwrites the message subject with the template one.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvo忙 <14975046+skjnldsv@users.noreply.github.com>
@skjnldsv

Copy link
Copy Markdown
Member

Just did it 馃き馃き
Thanks for the pr

@skjnldsv
skjnldsv enabled auto-merge October 11, 2026 20:28
@skjnldsv
skjnldsv merged commit b5434dc into nextcloud:main Oct 11, 2026
51 checks passed
@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

Labels

3. to review Waiting for reviews bug Something isn't working feedback-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invitation email shows broken logo on Nextcloud 34 (inline logo not attached)

2 participants