D | parser.go | 4 package email package 21 type Email struct { struct 39 func Parse(r io.Reader, ownEmails []string) (*Email, error) { 42 return nil, fmt.Errorf("failed to read email: %v", err) 46 return nil, fmt.Errorf("failed to parse email header 'From': %v", err) 49 return nil, fmt.Errorf("failed to parse email header 'To': no senders") 58 for _, email := range ownEmails { 59 ownAddrs[email] = true 60 if addr, err := mail.ParseAddress(email); err == nil { 107 email := &Email{ [all …]
|