email: fix EOF error when sending to Google SMTP relay
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:
- For regular SMTP: use
email.smtp
credentials prepopulated from the "dev-private". - 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" },
- Add a new valid email to your user settings.
- Receive the verification email.