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

@ -120,7 +120,7 @@ func Verify(elog *slog.Logger, r io.ReaderAt, key []byte, period time.Duration)
if err != nil {
return fmt.Errorf("%w: from address with bad localpart: %v", ErrFrom, err)
}
addr := smtp.Address{Localpart: lp, Domain: d}.Pack(true)
addr := smtp.NewAddress(lp, d).Pack(true)
buf, err := base64.RawURLEncoding.DecodeString(token)
if err != nil {