smtp: hide commit hash in user agent

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2024-06-21 18:31:42 +02:00
parent 71b974d4f8
commit a09e914635
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -324,7 +324,7 @@ func (c *Config) getMailClientOptions() []mail.Option {
func (c *Config) getSMTPClientAndMsg(to, bcc []string, subject, body string, contentType EmailContentType, func (c *Config) getSMTPClientAndMsg(to, bcc []string, subject, body string, contentType EmailContentType,
attachments ...*mail.File) (*mail.Client, *mail.Msg, error) { attachments ...*mail.File) (*mail.Client, *mail.Msg, error) {
msg := mail.NewMsg() msg := mail.NewMsg()
msg.SetUserAgent(version.GetServerVersion(" ", true)) msg.SetUserAgent(version.GetServerVersion(" ", false))
var from string var from string
if c.From != "" { if c.From != "" {