[GH-ISSUE #1025] Sending confirmation mail after registration fails #315

Closed
opened 2026-02-26 18:46:27 +03:00 by kerem · 4 comments
Owner

Originally created by @krakowski on GitHub (Mar 13, 2024).
Original GitHub issue: https://github.com/documenso/documenso/issues/1025

Issue Description

I deployed Documenso for evaluation purposes using Docker Compose and the production compose file. After configuring all SMTP-related environment variables and generating the certificate, I tried signing up through the web interface, which got stuck in the last step. Looking at the logs, it seems that the confirmation mail could not be sent out.

Environment Variables Set

  • NEXT_PRIVATE_SMTP_TRANSPORT = smtp-auth
  • NEXT_PRIVATE_SMTP_HOST = smtp.my-smtp-provider.com
  • NEXT_PRIVATE_SMTP_PORT = 587
  • NEXT_PRIVATE_SMTP_USERNAME = username
  • NEXT_PRIVATE_SMTP_PASSWORD = password
  • NEXT_PRIVATE_SMTP_SECURE = true
  • NEXT_PRIVATE_SMTP_FROM_NAME = Documenso
  • NEXT_PRIVATE_SMTP_FROM_ADDRESS = documenso@my-domain.com

I use the same credentials for another application (Bookstack) I am running on the same host, which works fine. Is there any way to increase the log verbosity in order to find out the underlying problem?

Steps to Reproduce

  1. Deploy Documenso using Docker Compose
  2. Configure SMTP
  3. Try to sign up
Error: Failed to send the confirmation email
    at E (/app/apps/web/.next/server/chunks/1178.js:1:10247)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /app/apps/web/.next/server/pages/api/trpc/[trpc].js:1:84762
    at async resolveMiddleware (file:///app/node_modules/@trpc/server/dist/index.mjs:420:30)
    at async callRecursive (file:///app/node_modules/@trpc/server/dist/index.mjs:456:32)
    at async callRecursive (file:///app/node_modules/@trpc/server/dist/index.mjs:456:32)
    at async resolve (file:///app/node_modules/@trpc/server/dist/index.mjs:486:24)
    at async inputToProcedureCall (file:///app/node_modules/@trpc/server/dist/resolveHTTPResponse-cd1a9112.mjs:46:22)
    at async Promise.all (index 0)
    at async resolveHTTPResponse (file:///app/node_modules/@trpc/server/dist/resolveHTTPResponse-cd1a9112.mjs:182:37)

Expected Behavior

Sending the confirmation mail should succeed.

Current Behavior

Sending the confirmation mail fails.

Screenshots (optional)

No response

Operating System [e.g., Windows 10]

Ubuntu 22.04

Browser [e.g., Chrome, Firefox]

Brave

Version [e.g., 2.0.1]

1.5.2

Please check the boxes that apply to this issue report.

  • I have searched the existing issues to make sure this is not a duplicate.
  • I have provided steps to reproduce the issue.
  • I have included relevant environment information.
  • I have included any relevant screenshots.
  • I understand that this is a voluntary contribution and that there is no guarantee of resolution.
  • I want to work on creating a PR for this issue if approved
Originally created by @krakowski on GitHub (Mar 13, 2024). Original GitHub issue: https://github.com/documenso/documenso/issues/1025 ### Issue Description I deployed Documenso for evaluation purposes using Docker Compose and the production compose file. After configuring all SMTP-related environment variables and generating the certificate, I tried signing up through the web interface, which got stuck in the last step. Looking at the logs, it seems that the confirmation mail could not be sent out. _Environment Variables Set_ * `NEXT_PRIVATE_SMTP_TRANSPORT` = `smtp-auth` * `NEXT_PRIVATE_SMTP_HOST` = `smtp.my-smtp-provider.com` * `NEXT_PRIVATE_SMTP_PORT` = `587` * `NEXT_PRIVATE_SMTP_USERNAME` = `username` * `NEXT_PRIVATE_SMTP_PASSWORD` = `password` * `NEXT_PRIVATE_SMTP_SECURE` = `true` * `NEXT_PRIVATE_SMTP_FROM_NAME` = `Documenso` * `NEXT_PRIVATE_SMTP_FROM_ADDRESS` = `documenso@my-domain.com` I use the same credentials for another application (Bookstack) I am running on the same host, which works fine. Is there any way to increase the log verbosity in order to find out the underlying problem? ### Steps to Reproduce 1. Deploy Documenso using Docker Compose 2. Configure SMTP 3. Try to sign up ``` Error: Failed to send the confirmation email at E (/app/apps/web/.next/server/chunks/1178.js:1:10247) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /app/apps/web/.next/server/pages/api/trpc/[trpc].js:1:84762 at async resolveMiddleware (file:///app/node_modules/@trpc/server/dist/index.mjs:420:30) at async callRecursive (file:///app/node_modules/@trpc/server/dist/index.mjs:456:32) at async callRecursive (file:///app/node_modules/@trpc/server/dist/index.mjs:456:32) at async resolve (file:///app/node_modules/@trpc/server/dist/index.mjs:486:24) at async inputToProcedureCall (file:///app/node_modules/@trpc/server/dist/resolveHTTPResponse-cd1a9112.mjs:46:22) at async Promise.all (index 0) at async resolveHTTPResponse (file:///app/node_modules/@trpc/server/dist/resolveHTTPResponse-cd1a9112.mjs:182:37) ``` ### Expected Behavior Sending the confirmation mail should succeed. ### Current Behavior Sending the confirmation mail fails. ### Screenshots (optional) _No response_ ### Operating System [e.g., Windows 10] Ubuntu 22.04 ### Browser [e.g., Chrome, Firefox] Brave ### Version [e.g., 2.0.1] 1.5.2 ### Please check the boxes that apply to this issue report. - [X] I have searched the existing issues to make sure this is not a duplicate. - [X] I have provided steps to reproduce the issue. - [X] I have included relevant environment information. - [ ] I have included any relevant screenshots. - [X] I understand that this is a voluntary contribution and that there is no guarantee of resolution. - [ ] I want to work on creating a PR for this issue if approved
kerem 2026-02-26 18:46:27 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 13, 2024):

Thank you for opening your first issue and for being a part of the open signing revolution!

One of our team members will review it and get back to you as soon as it possible 💚

Meanwhile, please feel free to hop into our community in Discord

<!-- gh-comment-id:1994474496 --> @github-actions[bot] commented on GitHub (Mar 13, 2024): Thank you for opening your first issue and for being a part of the open signing revolution! <br /> One of our team members will review it and get back to you as soon as it possible 💚 <br /> Meanwhile, please feel free to hop into our community in [Discord](https://documen.so/discord)
Author
Owner

@Mythie commented on GitHub (Mar 13, 2024):

G'day, this is likely relating to the SECURE env var which will force TLS rather than going through STARTLS if I recall. Have you tried flipping that between true/false already?

Knowing the provider you're trying to use may also help diagnose the issue, we just had someone in the community discord running into issues with Sendgrid and it turned out to be 2FA related on the provider side.

<!-- gh-comment-id:1994478679 --> @Mythie commented on GitHub (Mar 13, 2024): G'day, this is likely relating to the SECURE env var which will force TLS rather than going through STARTLS if I recall. Have you tried flipping that between true/false already? Knowing the provider you're trying to use may also help diagnose the issue, we just had someone in the community discord running into issues with Sendgrid and it turned out to be 2FA related on the provider side.
Author
Owner

@krakowski commented on GitHub (Mar 13, 2024):

Thanks for the quick response! 🙂

You are right, switching NEXT_PRIVATE_SMTP_SECURE to false resolved this issue and the confirmation mail went through. My interpretation was that this env var should be set to true if using a secure/encrypted connection.

I use Oracle Cloud for sending outgoing mails which stated that "Email Delivery requires a secure TLS connection to submit mail", so I set the env var to true not thinking it could be the cause.

<!-- gh-comment-id:1994926966 --> @krakowski commented on GitHub (Mar 13, 2024): Thanks for the quick response! :slightly_smiling_face: You are right, switching `NEXT_PRIVATE_SMTP_SECURE` to `false` resolved this issue and the confirmation mail went through. My interpretation was that this env var should be set to `true` if using a secure/encrypted connection. I use Oracle Cloud for sending outgoing mails which stated that "Email Delivery requires a secure TLS connection to submit mail", so I set the env var to `true` not thinking it could be the cause.
Author
Owner

@Mythie commented on GitHub (Mar 14, 2024):

Awesome glad you got it all sorted!

<!-- gh-comment-id:1996361267 --> @Mythie commented on GitHub (Mar 14, 2024): Awesome glad you got it all sorted!
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#315
No description provided.