Skip to content

email: fix EOF error when sending to Google SMTP relay

Administrator requested to merge jc/smtp-relay into main

Created by: unknwon

There is a problem with our current email sending process:

Always send "localhost" in HELO <hostname> instead of the configured "domain" as the hostname.

Fixes https://github.com/sourcegraph/sourcegraph/issues/35943

Test plan

Manual e2e tests:

  1. For regular SMTP: use email.smtp credentials prepopulated from the "dev-private".
  2. For Google SMTP relay, change the site config:
    "email.smtp": {
    "authentication": "PLAIN",
      "username": "<you>@sourcegraph.com",
      "password": "<App password>",
      "host": "smtp-relay.gmail.com",
      "port": 587,
      "domain": "sourcegraph.com"
    },
  3. Add a new valid email to your user settings.
  4. Receive the verification email.

Merge request reports

Loading