fix from address

This commit is contained in:
Arnaud Delcasse 2025-02-10 08:57:29 +01:00
parent d0065f0c2b
commit ef6b8aaa24
1 changed files with 1 additions and 7 deletions

View File

@ -78,6 +78,7 @@ func (m *Mailer) Send(emailcfg string, to string, data any, opts ...Option) erro
dialOptions := []mail.Option{
mail.WithSMTPAuth(mail.SMTPAuthAutoDiscover),
mail.WithTLSPolicy(mail.TLSOpportunistic),
// mail.WithSMTPAuth(mail.SMTPAuthNoAuth),
mail.WithUsername(m.SMTPConfig.Username),
mail.WithPassword(m.SMTPConfig.Password),
@ -114,13 +115,6 @@ func WithReplyTo(email string) Option {
}
}
func WithTLSOpportunistic() Option {
return func(m *mail.Msg, opts []mail.Option) ([]mail.Option, error) {
opts = append(opts, mail.WithTLSPolicy(mail.TLSOpportunistic))
return opts, nil
}
}
func UnescapeHTML(s string) template.HTML {
return template.HTML(s)
}