[PR #2784] [MERGED] attach images in email #3147

Closed
opened 2026-03-03 09:26:12 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/2784
Author: @stefan0xC
Created: 10/2/2022
Status: Merged
Merged: 10/19/2022
Merged by: @dani-garcia

Base: mainHead: email-attach-images


📝 Commits (2)

  • ea19c22 attach images to email
  • 4289663 use static_files() for email attachments

📊 Changes

7 files changed (+71 additions, -6 deletions)

View changed files

📝 .env.template (+3 -0)
📝 src/api/mod.rs (+1 -0)
📝 src/api/web.rs (+1 -1)
📝 src/config.rs (+12 -0)
📝 src/mail.rs (+52 -3)
📝 src/static/templates/email/email_footer.hbs (+1 -1)
📝 src/static/templates/email/email_header.hbs (+1 -1)

📄 Description

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/2784 **Author:** [@stefan0xC](https://github.com/stefan0xC) **Created:** 10/2/2022 **Status:** ✅ Merged **Merged:** 10/19/2022 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `email-attach-images` --- ### 📝 Commits (2) - [`ea19c22`](https://github.com/dani-garcia/vaultwarden/commit/ea19c2250e0812659461c8abaf8f1a85e69c7423) attach images to email - [`4289663`](https://github.com/dani-garcia/vaultwarden/commit/4289663a1697bd8d78743e2c8eaef255cb811e1b) use static_files() for email attachments ### 📊 Changes **7 files changed** (+71 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `.env.template` (+3 -0) 📝 `src/api/mod.rs` (+1 -0) 📝 `src/api/web.rs` (+1 -1) 📝 `src/config.rs` (+12 -0) 📝 `src/mail.rs` (+52 -3) 📝 `src/static/templates/email/email_footer.hbs` (+1 -1) 📝 `src/static/templates/email/email_header.hbs` (+1 -1) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 09:26:12 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#3147
No description provided.