vaultwarden
vaultwarden copied to clipboard
attach images in email
Since many email clients don't load external images I was wondering if we should include the images as attachment instead.
Some drawbacks to this change:
- Embedding the images as attachments makes the mails around ~5kb bigger.
- If you change the templates vaultwarden would still attach the images to the mail.
It might be an option to add a new config option,
SMTP_EMBED_IMAGES
or something like that and have it dynamically embed or provide the external link.
Okay, I will look into that.
Put the images inthere as true svgs if possible, they are code so will render in email even without a request from the user
Op zo 2 okt. 2022 om 03:04 schreef Stefan Melmuk @.***>
Since many email clients don't load external images I was wondering if we should include the images as attachment instead.
Some drawbacks to this change:
- Embedding the images as attachments makes the mails around ~5kb bigger.
- If you want too change the templates the mail would still attach the images.
You can view, comment on, or merge this pull request online at:
https://github.com/dani-garcia/vaultwarden/pull/2784 Commit Summary
- 2868a66 https://github.com/dani-garcia/vaultwarden/pull/2784/commits/2868a6663e9e884e2bb248b5a161f76f42089a6f attach images in email
File Changes
(3 files https://github.com/dani-garcia/vaultwarden/pull/2784/files)
- M src/mail.rs https://github.com/dani-garcia/vaultwarden/pull/2784/files#diff-02d3b205a438920e7c90dc9a121d5f81f2f04940aea6f9c2b48c7adea12305db (21)
- M src/static/templates/email/email_footer.hbs https://github.com/dani-garcia/vaultwarden/pull/2784/files#diff-bc86d9b9425d4877f78232f9e7e7ce9fbc598b3e15efce623df41bf5c9726d90 (2)
- M src/static/templates/email/email_header.hbs https://github.com/dani-garcia/vaultwarden/pull/2784/files#diff-55486ec3af179bfee475e71ce646f61e80adaf1076aa1f4d8a41b0726255aa71 (2)
Patch Links:
- https://github.com/dani-garcia/vaultwarden/pull/2784.patch
- https://github.com/dani-garcia/vaultwarden/pull/2784.diff
— Reply to this email directly, view it on GitHub https://github.com/dani-garcia/vaultwarden/pull/2784, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPNV26RV46JIQAOBBDFRZTWBDNRFANCNFSM6AAAAAAQ2VYB7A . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Put the images inthere as true svgs if possible, they are code so will render in email even without a request from the user
That probably isn't working for all clients, and probably suffers from the same issues as using a base64 image src, that some client's just block that by default without a way to show it at all.
CID
is old, but still works.