You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all I would like to discuss the changes. Current strucutre of address is
type Address struct {
Name string // Proper name; may be empty.
Address string // user@domain
}
These are possible implementations:
Ignore groups at all; group-list is resolved into mailbost-list. But I have no idea how to handle group address in mail.ParseAddress because it returns single Address struct.
Change Address struct into smth like:
type SingleAddress struct {
Name string // Proper name; may be empty.
Address string // user@domain
}
type GroupAddress struct {
Name string // group name
Addresses []SingleAddress
}
type Address struct {
SingleAddress
IsGroup bool // true if address is group one
GroupAddress GroupAddress
}
This implementation won't break backward compatibility, but Address struct becomes terrible.
Add separate method for parsing group addresses.
So i would like to listen your thoughts about it.
The text was updated successfully, but these errors were encountered:
I want to add support for parsing group email addresses as defined in rfc5322(https://www.ietf.org/rfc/rfc5322.txt).
First of all I would like to discuss the changes. Current strucutre of address is
These are possible implementations:
Ignore groups at all;
group-list
is resolved intomailbost-list
. But I have no idea how to handle group address inmail.ParseAddress
because it returns singleAddress
struct.Change
Address
struct into smth like:This implementation won't break backward compatibility, but
Address
struct becomes terrible.So i would like to listen your thoughts about it.
The text was updated successfully, but these errors were encountered: