Newlines in smtp password file are now ignored

This commit is contained in:
Giorgio Gallo 2024-01-22 21:26:18 +01:00
parent f92a08d073
commit 4271a77bd0
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -368,7 +368,7 @@ func (n *Email) getPassword() (string, error) {
if err != nil { if err != nil {
return "", fmt.Errorf("could not read %s: %w", n.conf.AuthPasswordFile, err) return "", fmt.Errorf("could not read %s: %w", n.conf.AuthPasswordFile, err)
} }
return string(content), nil return strings.TrimSpace(string(content)), nil
} }
return string(n.conf.AuthPassword), nil return string(n.conf.AuthPassword), nil
} }