Add SMTP_NOAUTH support for unauthenticated SMTP servers #425

Merged
mderasse merged 2 commits from main into main 2026-05-22 22:00:45 -05:00
mderasse commented 2026-05-18 01:22:05 -05:00 (Migrated from github.com)

Description

Adds a new SMTP_NOAUTH environment variable (boolean, defaults to false) that allows disabling SMTP authentication when connecting to mail servers that don't require credentials, such as those using IP whitelisting. (let me know if you prefer to just check if user and pass are empty and avoid an env variable)

When set to true, the nodemailer transport's auth object is set to undefined, skipping the authentication step entirely.

This avoids connection errors that occur when nodemailer attempts to authenticate against servers that have no auth mechanism configured.

## Description Adds a new SMTP_NOAUTH environment variable (boolean, defaults to false) that allows disabling SMTP authentication when connecting to mail servers that don't require credentials, such as those using IP whitelisting. (let me know if you prefer to just check if user and pass are empty and avoid an env variable) When set to true, the nodemailer transport's auth object is set to undefined, skipping the authentication step entirely. This avoids connection errors that occur when nodemailer attempts to authenticate against servers that have no auth mechanism configured.
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2026-05-18 01:23:07 -05:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull request overview

Adds a new SMTP_NOAUTH configuration option that allows users to disable SMTP authentication when connecting to mail servers that do not require credentials (e.g., IP-whitelisted relays).

Changes:

  • Introduce SMTP_NOAUTH boolean config field with default false, parsed as boolean from env.
  • Conditionally omit the nodemailer auth object when SMTP_NOAUTH is true.
  • Document the new env variable in Getting-Started.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
server/util/config.ts Adds the SMTP_NOAUTH field and includes it in the boolean-parsing branch of assignConfigValue.
server/util/email.ts Sets the nodemailer transport auth to undefined when SMTP_NOAUTH is enabled.
docs/Getting-Started.md Documents the new SMTP_NOAUTH environment variable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Pull request overview Adds a new `SMTP_NOAUTH` configuration option that allows users to disable SMTP authentication when connecting to mail servers that do not require credentials (e.g., IP-whitelisted relays). **Changes:** - Introduce `SMTP_NOAUTH` boolean config field with default `false`, parsed as boolean from env. - Conditionally omit the nodemailer `auth` object when `SMTP_NOAUTH` is true. - Document the new env variable in Getting-Started.md. ### Reviewed changes Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments. | File | Description | | ---- | ----------- | | server/util/config.ts | Adds the `SMTP_NOAUTH` field and includes it in the boolean-parsing branch of `assignConfigValue`. | | server/util/email.ts | Sets the nodemailer transport `auth` to `undefined` when `SMTP_NOAUTH` is enabled. | | docs/Getting-Started.md | Documents the new `SMTP_NOAUTH` environment variable. | --- 💡 <a href="/voidauth/voidauth/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
Sign in to join this conversation.
No description provided.