1
0

chore(mail): update logger to new interface

This commit is contained in:
kolaente
2024-06-18 13:28:10 +02:00
committed by konrad
parent 0799ed4691
commit f222ecfa19
3 changed files with 22 additions and 19 deletions

View File

@ -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() != "" {

View File

@ -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 {