worker/lib/parse: be more tolerant with parsing email addresses
This commit is contained in:
parent
77d54fe99f
commit
8c8096da97
|
@ -145,7 +145,7 @@ func parseAddressList(h *mail.Header, key string) ([]*models.Address, error) {
|
||||||
var converted []*models.Address
|
var converted []*models.Address
|
||||||
addrs, err := h.AddressList(key)
|
addrs, err := h.AddressList(key)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if hdr, err := h.Text(key); err != nil && strings.Contains(hdr, "@") {
|
if hdr, err := h.Text(key); err == nil {
|
||||||
return []*models.Address{&models.Address{
|
return []*models.Address{&models.Address{
|
||||||
Name: hdr,
|
Name: hdr,
|
||||||
}}, nil
|
}}, nil
|
||||||
|
|
Loading…
Reference in New Issue