chore(mail): update logger to new interface
This commit is contained in:
@ -49,7 +49,7 @@ func getClient() (*mail.Client, error) {
|
||||
|
||||
opts := []mail.Option{
|
||||
mail.WithPort(config.MailerPort.GetInt()),
|
||||
mail.WithTLSPolicy(tlsPolicy),
|
||||
mail.WithTLSPortPolicy(tlsPolicy),
|
||||
mail.WithTLSConfig(&tls.Config{
|
||||
//#nosec G402
|
||||
InsecureSkipVerify: config.MailerSkipTLSVerify.GetBool(),
|
||||
@ -61,7 +61,7 @@ func getClient() (*mail.Client, error) {
|
||||
}
|
||||
|
||||
if config.MailerForceSSL.GetBool() {
|
||||
opts = append(opts, mail.WithSSL())
|
||||
opts = append(opts, mail.WithSSLPort(true))
|
||||
}
|
||||
|
||||
if config.MailerUsername.GetString() != "" && config.MailerPassword.GetString() != "" {
|
||||
|
@ -89,7 +89,10 @@ func getMessage(opts *Opts) *mail.Msg {
|
||||
}
|
||||
|
||||
for name, content := range opts.Embeds {
|
||||
m.EmbedReader(name, content)
|
||||
err := m.EmbedReader(name, content)
|
||||
if err != nil {
|
||||
log.Errorf("Could not create reader to embet into mail: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
for name, fs := range opts.EmbedFS {
|
||||
|
Reference in New Issue
Block a user