Skip to content
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

Allow for unsecure SMTP settings for local unencrypted smtp relays #10605

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

clivinghouse
Copy link

This update provides the flexibility for users to configure SMTP for local instances where encryption is not required. For environments using an unencrypted SMTP relay or similar local instances that are not open to the public, the end user can now choose to disable encryption. This ensures flexibility in the configuration while still maintaining the option for secure SMTP connections in other environments.

From NodeMailer

secure – if true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false.

ignoreTLSif this is true and secure is false then TLS is not used even if the server supports STARTTLS extension.

Copy link
Contributor

github-actions bot commented Mar 2, 2025

Welcome!

Hello there, congrats on your first PR! We're excited to have you contributing to this project.
By submitting your Pull Request, you acknowledge that you agree with the terms of our Contributor License Agreement.

Generated by 🚫 dangerJS against 7f546bc

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR adds support for unsecured SMTP connections by introducing the EMAIL_SMTP_NO_TLS environment variable for local development environments.

  • Added EMAIL_SMTP_NO_TLS environment variable with proper validation in environment-variables.ts
  • Modified email.module-factory.ts to check for the noTLS flag and set both secure: false and ignoreTLS: true when enabled
  • Refactored SMTP configuration to use an options object for better organization
  • Improved error handling for missing SMTP host/port configuration
  • Implemented according to NodeMailer documentation for completely disabling TLS encryption

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

2 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant