fix from address
This commit is contained in:
parent
d0065f0c2b
commit
ef6b8aaa24
|
@ -78,6 +78,7 @@ func (m *Mailer) Send(emailcfg string, to string, data any, opts ...Option) erro
|
||||||
|
|
||||||
dialOptions := []mail.Option{
|
dialOptions := []mail.Option{
|
||||||
mail.WithSMTPAuth(mail.SMTPAuthAutoDiscover),
|
mail.WithSMTPAuth(mail.SMTPAuthAutoDiscover),
|
||||||
|
mail.WithTLSPolicy(mail.TLSOpportunistic),
|
||||||
// mail.WithSMTPAuth(mail.SMTPAuthNoAuth),
|
// mail.WithSMTPAuth(mail.SMTPAuthNoAuth),
|
||||||
mail.WithUsername(m.SMTPConfig.Username),
|
mail.WithUsername(m.SMTPConfig.Username),
|
||||||
mail.WithPassword(m.SMTPConfig.Password),
|
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 {
|
func UnescapeHTML(s string) template.HTML {
|
||||||
return template.HTML(s)
|
return template.HTML(s)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue