mikel / mail

A Really Ruby Mail Library
MIT License
3.61k stars 933 forks source link

Mail::AddressList can not parse |my test email| #827

Open rishijain opened 9 years ago

rishijain commented 9 years ago

I am on ruby 2.0.0p451

Not able to parse and return false when passed an invalid email address. This is a test case I added in spec/mail/parsers/address_lists_parser_spec.rb and ran it "should parse an address" do text = 'ddfafo asd' a = Mail::Parsers::AddressListsParser.new expect(a.parse(text)).not_to be_nil end

And I get this error: Mail::Field::ParseError: Mail::AddressList can not parse |my test email|

bf4 commented 9 years ago

Are you asking to change the parsing behavior for an invalid email address from raising an exception to failing silently and returning nil?