[PR #1447] [MERGED] feat(email): support configurable SMTP service #1637

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1447
Author: @Jorgagu
Created: 11/5/2024
Status: Merged
Merged: 11/6/2024
Merged by: @dguyen

Base: mainHead: feat/add-smtp-service-option


📝 Commits (3)

  • 601aa50 feat(email): support configurable SMTP service
  • e5795d1 docs(email): add comprehensive JSDoc for getTransport function
  • a620a85 fix: update docker environment

📊 Changes

4 files changed (+54 additions, -1 deletions)

View changed files

📝 .env.example (+2 -0)
📝 docker/production/compose.yml (+1 -0)
📝 packages/email/mailer.ts (+50 -1)
📝 turbo.json (+1 -0)

📄 Description


name: Pull Request
about: Submit changes to the project for review and inclusion

Description

This pull request introduces support for a configurable SMTP service in the Documenso email system. By adding an optional environment variable, NEXT_PRIVATE_SMTP_SERVICE, we provide users with greater flexibility when configuring their email service provider. This change helps solve issues specifically related to compatibility with Gmail Relay and expands support for other SMTP configurations.

Addresses #1446.

Changes Made

  • Environment Variable: Introduced NEXT_PRIVATE_SMTP_SERVICE as an optional variable in .env.example to allow specifying the email service for Nodemailer.
  • Mailer Update: Updated mailer.ts to conditionally include the service option, improving compatibility with email providers like Gmail Relay.
  • Configuration: Updated turbo.json to include the new environment variable, ensuring consistent usage across the build and deployment processes.

Testing Performed

  • Local Testing: Verified email sending with various SMTP configurations, including Gmail Relay.
  • Unit Tests: Ran existing unit tests to ensure no regressions were introduced.
  • Compatibility Check: Ensured backward compatibility by testing with configurations that do not specify the new service variable.
  • Code Review: Addressed code quality and style guidelines as per the project's standards.

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.

Additional Notes

These changes maintain backward compatibility and do not introduce breaking changes. The new environment variable is optional and defaults to the existing behavior, ensuring a smooth transition for current users. If reviewers have additional scenarios they'd like tested, please let me know!

Summary by CodeRabbit

  • New Features

    • Introduced a new optional environment variable for SMTP configuration, allowing users to specify the SMTP service in the .env.example file.
  • Enhancements

    • Improved flexibility in SMTP transport configuration by allowing the inclusion of a service provider based on the new environment variable.
  • Configuration Updates

    • Added the NEXT_PRIVATE_SMTP_SERVICE variable to the global environment settings in turbo.json.
    • Updated the docker/production/compose.yml to include the new environment variable for the documenso service.

🔄 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/1447 **Author:** [@Jorgagu](https://github.com/Jorgagu) **Created:** 11/5/2024 **Status:** ✅ Merged **Merged:** 11/6/2024 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `feat/add-smtp-service-option` --- ### 📝 Commits (3) - [`601aa50`](https://github.com/documenso/documenso/commit/601aa503442a9257ef495109f26e1872205631e8) feat(email): support configurable SMTP service - [`e5795d1`](https://github.com/documenso/documenso/commit/e5795d14d875dcbc9cfb83ac3e2abb398084d4fa) docs(email): add comprehensive JSDoc for getTransport function - [`a620a85`](https://github.com/documenso/documenso/commit/a620a8543823a0dfc5874eb8e9cde8c02437c5b7) fix: update docker environment ### 📊 Changes **4 files changed** (+54 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+2 -0) 📝 `docker/production/compose.yml` (+1 -0) 📝 `packages/email/mailer.ts` (+50 -1) 📝 `turbo.json` (+1 -0) </details> ### 📄 Description --- name: Pull Request about: Submit changes to the project for review and inclusion --- ## Description This pull request introduces support for a configurable SMTP service in the Documenso email system. By adding an optional environment variable, `NEXT_PRIVATE_SMTP_SERVICE`, we provide users with greater flexibility when configuring their email service provider. This change helps solve issues specifically related to compatibility with Gmail Relay and expands support for other SMTP configurations. ## Related Issue Addresses #1446. ## Changes Made - **Environment Variable**: Introduced `NEXT_PRIVATE_SMTP_SERVICE` as an optional variable in `.env.example` to allow specifying the email service for Nodemailer. - **Mailer Update**: Updated `mailer.ts` to conditionally include the `service` option, improving compatibility with email providers like Gmail Relay. - **Configuration**: Updated `turbo.json` to include the new environment variable, ensuring consistent usage across the build and deployment processes. ## Testing Performed - **Local Testing**: Verified email sending with various SMTP configurations, including Gmail Relay. - **Unit Tests**: Ran existing unit tests to ensure no regressions were introduced. - **Compatibility Check**: Ensured backward compatibility by testing with configurations that do not specify the new service variable. - **Code Review**: Addressed code quality and style guidelines as per the project's standards. ## Checklist - [x] I have tested these changes locally and they work as expected. - [x] I have added/updated tests that prove the effectiveness of these changes. - [x] I have updated the documentation to reflect these changes, if applicable. - [x] I have followed the project's coding style guidelines. - [x] I have addressed the code review feedback from the previous submission, if applicable. ## Additional Notes These changes maintain backward compatibility and do not introduce breaking changes. The new environment variable is optional and defaults to the existing behavior, ensuring a smooth transition for current users. If reviewers have additional scenarios they'd like tested, please let me know! <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new optional environment variable for SMTP configuration, allowing users to specify the SMTP service in the `.env.example` file. - **Enhancements** - Improved flexibility in SMTP transport configuration by allowing the inclusion of a service provider based on the new environment variable. - **Configuration Updates** - Added the `NEXT_PRIVATE_SMTP_SERVICE` variable to the global environment settings in `turbo.json`. - Updated the `docker/production/compose.yml` to include the new environment variable for the `documenso` service. <!-- 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:34:07 +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#1637
No description provided.