fix(mail): fmt address correctly

This commit is contained in:
2025-11-20 13:02:04 +01:00
parent d0db384287
commit f7b9e98520

View File

@@ -110,7 +110,7 @@ func (p *Plugin) sendMail(recipient string, r io.Reader) error {
// log.Printf("START_TLS: %v", p.smtpSettings.StartTLS) // log.Printf("START_TLS: %v", p.smtpSettings.StartTLS)
// log.Printf("INSECURE: %v", p.smtpSettings.TLSInsecureSkipVerify) // log.Printf("INSECURE: %v", p.smtpSettings.TLSInsecureSkipVerify)
address := fmt.Sprintf("%s:%d", p.smtpSettings.Host, p.smtpSettings.Port) address := fmt.Sprintf("%v:%v", p.smtpSettings.Host, p.smtpSettings.Port)
tcpConn, err := net.Dial("tcp", address) tcpConn, err := net.Dial("tcp", address)
if err != nil { if err != nil {
return fmt.Errorf("failed to dial a connection to %s: %w", address, err) return fmt.Errorf("failed to dial a connection to %s: %w", address, err)