coder / internal

Non-community issues related to coder/coder
2 stars 0 forks source link

bug: logo does not load automatically in email template #24

Open dannykopping opened 4 months ago

dannykopping commented 4 months ago

Previously I tried to embed our logo in the SMTP email template, but it was not supported in Gmail.

Currently we link to the logo in the template. https://github.com/coder/coder/blob/main/coderd/notifications/dispatch/smtp/html.gotmpl#L11

@mafredri suggested there may be other approaches to embedding images such as CIDs. This article from SendGrid (Apr 2024) suggests that CIDs may not work in Gmail reliably, but it's worth trying - or using multiple techniques together.

kylecarbs commented 3 months ago

An image tag with src and mime doesn't work as HTML?

dannykopping commented 3 months ago

Could you please clarify what you're asking @kylecarbs, so I avoid misunderstanding you?

kylecarbs commented 3 months ago

Ahh, sorry I was taking context from Slack.

Instead of linking externally to our logo, can we take the SVG content and base64 it, then toss it in an image tag?

https://stackoverflow.com/questions/6706891/embedding-image-in-html-email

dannykopping commented 3 months ago

I initially tried that, but it's not compatible with all email clients.

kylecarbs commented 3 months ago

Makes sense and I figured that'd be your response

dannykopping commented 3 months ago

Sure thing 👍 I should've included that context in the issue. Thanks for clarifying @kylecarbs