Rename FROM_ADDRESS env var

This commit is contained in:
Adriano Caloiaro 2023-07-29 21:28:06 -06:00
parent a63e690bd1
commit eaf6b43687
No known key found for this signature in database
GPG key ID: C2BC56DE73CE3F75
2 changed files with 2 additions and 2 deletions

View file

@ -20,4 +20,4 @@ SMTP_USERNAME=<SMTP_USERNAME>
SMTP_PASSWORD=<SMTP_PASSWORD>
# The email address from which emails are sent
SMTP_FROM_ADDRESS=<SMTP_FROM_ADDRESS>
SMTP_SENDER=<SMTP_SENDER>

View file

@ -670,7 +670,7 @@ func listGarbageHandler(w http.ResponseWriter, r *http.Request) {
// email address verification
func sendWelcomeEmail(recipient, verificationURL, siteName string) error {
smtpHost := os.Getenv("SMTP_HOST")
from := os.Getenv("SMTP_FROM_ADDRESS")
from := fmt.Sprintf("noreply@%s", os.Getenv("SITE_DOMAIN"))
to := []string{recipient}
log.Println("SMTP host:", smtpHost, "from:", from)