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

@ -1229,7 +1229,7 @@ func (s server) MessageGet(ctx context.Context, req webapi.MessageGetRequest) (r
var msgFrom string
if d, err := dns.ParseDomain(m.MsgFromDomain); err == nil {
msgFrom = smtp.Address{Localpart: m.MsgFromLocalpart, Domain: d}.Pack(true)
msgFrom = smtp.NewAddress(m.MsgFromLocalpart, d).Pack(true)
}
meta := webapi.MessageMeta{
Size: m.Size,