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

@ -673,7 +673,7 @@ many authentication failures).
// Messages to postmaster will get to the account too.
var contactEmail string
if addr.Localpart.IsInternational() {
contactEmail = smtp.Address{Localpart: "postmaster", Domain: addr.Domain}.Pack(false)
contactEmail = smtp.NewAddress("postmaster", addr.Domain).Pack(false)
} else {
contactEmail = addr.Pack(false)
}