[PR #1215] [MERGED] feat: send custom email to signers of direct template documents #1481

Closed
opened 2026-02-26 19:33:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1215
Author: @ephraimduncan
Created: 7/2/2024
Status: Merged
Merged: 7/5/2024
Merged by: @Mythie

Base: mainHead: feat/direct-link-custom-email


📝 Commits (5)

  • e03f44e feat: send custom email to signers of direct template documents
  • eb90ee0 chore: remove unused logs
  • d1cdc49 fix: use fullname when user is not logged in
  • a71a059 Update packages/email/template-components/template-document-completed.tsx
  • 1074b08 fix: don't send empty bodies for normal emails

📊 Changes

8 files changed (+51 additions, -9 deletions)

View changed files

📝 apps/web/src/app/(recipient)/d/[token]/direct-template.tsx (+2 -1)
📝 packages/email/template-components/template-document-completed.tsx (+3 -1)
📝 packages/email/templates/document-completed.tsx (+5 -1)
📝 packages/lib/server-only/document/move-document-to-team.ts (+0 -2)
📝 packages/lib/server-only/document/send-completed-email.ts (+19 -1)
📝 packages/lib/server-only/template/create-document-from-direct-template.ts (+13 -1)
📝 packages/trpc/server/template-router/router.ts (+8 -2)
📝 packages/trpc/server/template-router/schema.ts (+1 -0)

📄 Description

Description

Introduces customization options for the document completion email template to allow for custom email bodies and subjects for documents created from direct templates.

Testing Performed

  • Verified correct rendering of custom email subject and body for direct template documents

Checklist

  • I have tested these changes locally and they work as expected.
  • I have added/updated tests that prove the effectiveness of these changes.
  • I have updated the documentation to reflect these changes, if applicable.
  • I have followed the project's coding style guidelines.
  • I have addressed the code review feedback from the previous submission, if applicable.

Summary by CodeRabbit

  • New Features

    • Added custom email template rendering for completed documents with support for dynamic message content.
    • Introduced an optional customBody prop in email templates, allowing for custom messages in email notifications.
    • Enhanced document creation from direct templates by including the recipient's name.
  • Bug Fixes

    • Removed unnecessary console logs to streamline backend operations.
  • Refactor

    • Updated multiple functions and components to accept new parameters and props for enhanced customization and functionality.

🔄 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/documenso/documenso/pull/1215 **Author:** [@ephraimduncan](https://github.com/ephraimduncan) **Created:** 7/2/2024 **Status:** ✅ Merged **Merged:** 7/5/2024 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `feat/direct-link-custom-email` --- ### 📝 Commits (5) - [`e03f44e`](https://github.com/documenso/documenso/commit/e03f44e71e61c647a8f2a5b67f37c3aa3b1fc0a6) feat: send custom email to signers of direct template documents - [`eb90ee0`](https://github.com/documenso/documenso/commit/eb90ee0bad5cd54cfcb527a976649919ac58b84b) chore: remove unused logs - [`d1cdc49`](https://github.com/documenso/documenso/commit/d1cdc494ef78852940ed6c154a74ba8fb4935a3b) fix: use fullname when user is not logged in - [`a71a059`](https://github.com/documenso/documenso/commit/a71a0593fd64bee772354c4a28bf711ae92fa2fd) Update packages/email/template-components/template-document-completed.tsx - [`1074b08`](https://github.com/documenso/documenso/commit/1074b08551e826db5e63d5a32137605756b45291) fix: don't send empty bodies for normal emails ### 📊 Changes **8 files changed** (+51 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(recipient)/d/[token]/direct-template.tsx` (+2 -1) 📝 `packages/email/template-components/template-document-completed.tsx` (+3 -1) 📝 `packages/email/templates/document-completed.tsx` (+5 -1) 📝 `packages/lib/server-only/document/move-document-to-team.ts` (+0 -2) 📝 `packages/lib/server-only/document/send-completed-email.ts` (+19 -1) 📝 `packages/lib/server-only/template/create-document-from-direct-template.ts` (+13 -1) 📝 `packages/trpc/server/template-router/router.ts` (+8 -2) 📝 `packages/trpc/server/template-router/schema.ts` (+1 -0) </details> ### 📄 Description ## Description Introduces customization options for the document completion email template to allow for custom email bodies and subjects for documents created from direct templates. ## Testing Performed - Verified correct rendering of custom email subject and body for direct template documents ## Checklist - [x] I have tested these changes locally and they work as expected. - [ ] I have added/updated tests that prove the effectiveness of these changes. - [ ] I have updated the documentation to reflect these changes, if applicable. - [x] I have followed the project's coding style guidelines. - [ ] I have addressed the code review feedback from the previous submission, if applicable. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added custom email template rendering for completed documents with support for dynamic message content. - Introduced an optional `customBody` prop in email templates, allowing for custom messages in email notifications. - Enhanced document creation from direct templates by including the recipient's name. - **Bug Fixes** - Removed unnecessary console logs to streamline backend operations. - **Refactor** - Updated multiple functions and components to accept new parameters and props for enhanced customization and functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:33:27 +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/documenso#1481
No description provided.