- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.5k
[PM-27593] Add docs for legacy mail service #6513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| 
 Great job! No new security vulnerabilities introduced in this pull request | 
| Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@            Coverage Diff             @@
##             main    #6513      +/-   ##
==========================================
+ Coverage   51.85%   51.86%   +0.01%     
==========================================
  Files        1901     1901              
  Lines       84074    84051      -23     
  Branches     7509     7501       -8     
==========================================
  Hits        43594    43594              
+ Misses      38786    38763      -23     
  Partials     1694     1694              ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
| Claude finished @trmartin4's task —— View job PR Review: Add docs for legacy mail serviceSummaryThis PR documents the deprecation of  Key Changes: 
 Critical IssuesNone found. Suggested Improvements1. Documentation Clarity - README.md structureThe README could be improved for better readability: Current: src/Core/Platform/Mail/README.md:3-10 > [!CAUTION]
> Adding new methods to the `HandlebarsMailService` is no longer the recommended approach...
# Overriding email templates from disk
The `HandlebarsMailService` supports loading...Suggestion: Consider adding a clear heading for the deprecation section to match the structure of the template override section: # Mail Service
## Deprecation Notice
> [!CAUTION]
> Adding new methods to the `HandlebarsMailService` is no longer the recommended approach to building and sending emails. Instead, the [Mailer](../Mailer/README.md) implementation is preferred, along with the [MJML](../../MailTemplates/README.md) pipeline.
## Overriding email templates from disk
The `HandlebarsMailService` supports loading the mail template from disk...This provides better visual hierarchy and makes it clearer that there are two distinct topics being covered. 2. Verify linked documentation existsLocation: src/Core/Platform/Mail/README.md:4 The README references  Verification needed# Check if referenced docs exist
ls -la src/Core/Platform/Mailer/README.md
ls -la src/Core/MailTemplates/README.mdIf these don't exist yet, consider either: 
 3. Minor wording improvement - README.md:10Current wording: src/Core/Platform/Mail/README.md:10 **Bitwarden is not responsible for maintaining backward compatibility between releases in order to support any overridden emails.**Suggestion: The double emphasis (bold + caution block) is appropriate, but consider slightly softening the language while maintaining clarity: **Bitwarden does not maintain backward compatibility between releases for overridden email templates. Customers using template overrides are responsible for updating their customizations when templates change.**This maintains the important disclaimer while being slightly more constructive about the customer's responsibility. Good Practices Observed
 Action Items
 Additional NotesThe namespace preservation strategy ( 
 This is consistent with the goal of documenting deprecation rather than forcing immediate migration. | 
| @@ -1,5 +1,5 @@ | |||
| using Bit.Core.Models.Mail; | |||
| using Bit.Core.Services; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does mailer go to it's own namespace and not just in ..Services.Mail, for example?

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-27593
📔 Objective
We would like to document that the
HandlebarsMailServicehas been deprecated in favor of theMailer, and also add documentation in code about the support guarantees of our disk overrides of mail templates, so that there is no confusion in the future about this feature and its expectations.Creating a "home" for the documentation that made sense required moving the mail-related services out of the shared
Servicesfolder and into their own "feature" folder. This is our current best practice and allows contextual, close-to-codeREADMEs for developer and AI usage.📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes