use shorter smtp.NewAddress() instead of smtp.Address{...}

This commit is contained in:
Mechiel Lukkien
2024-05-09 21:26:22 +02:00
parent 1179d9d80a
commit ebb8ad06b5
9 changed files with 10 additions and 10 deletions

View File

@ -51,6 +51,6 @@ func From(elog *slog.Logger, strict bool, r io.ReaderAt, p *Part) (raddr smtp.Ad
if err != nil {
return raddr, nil, nil, fmt.Errorf("parsing localpart in from address: %v", err)
}
addr := smtp.Address{Localpart: lp, Domain: d}
addr := smtp.NewAddress(lp, d)
return addr, p.Envelope, textproto.MIMEHeader(header), nil
}