Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address local part does not seem to survive round-trip when containing non-ascii characters #611

Closed
the8472 opened this issue Aug 22, 2013 · 5 comments

Comments

@the8472
Copy link

commented Aug 22, 2013

Mail::VERSION.version
# => "2.5.4" 
Mail.new do
  from 'Mäx Mustermann <"füü.baz"@bar.test>'
end.header["from"].addrs.first.local
# => "=?UTF-8?B?ZsO8w7wuYmF6?=" 

the display_name on the other hand is preserved properly

@chrislloyd

This comment has been minimized.

Copy link

commented Jan 8, 2014

This is part of a larger problem which I think I can boil down to a smaller test:

> Mail::Address.new("Mäx <mäx@example.com>")
# Mail::Field::ParseError: Mail::AddressListsParser can not parse |Mäx <mäx@example.com>|
# Reason was: Expected one of !, #, $, %, &, ', *, +, -, /, =, ?, ^, _, `, {, |, }, ~, 
# , (, ", ., @, :, <, ,, ; at line 1, column 2 (byte 2) after 
#   from /usr/local/var/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/mail-2.5.4/lib/mail/elements/address_list.rb:29:in `initialize'
@the8472

This comment has been minimized.

Copy link
Author

commented Jan 8, 2014

I was drawing on some of the more esoteric rules of the relevant RFCs to sharpen the edge-case so to speak. Quoted local parts and all that.

@jeremy

This comment has been minimized.

Copy link
Collaborator

commented May 17, 2017

Fixed by #1103.

@jeremy jeremy closed this May 17, 2017

@vijayaraj

This comment has been minimized.

Copy link

commented Sep 7, 2017

Hi, I still see this error in 2.7.0.rc1

Mail::AddressList.new("Dinâmica Equipe <test@example.com>")
Mail::Field::ParseError: Mail::AddressList can not parse |Dinâmica Equipe <test@example.com>|
Reason was: Only able to parse up to Dinâ
	from /Users/user/.rvm/gems/ruby-2.3.1@test_proj/gems/mail-2.7.0.rc1/lib/mail/parsers/address_lists_parser.rb:15336:in `parse'
@jeremy

This comment has been minimized.

Copy link
Collaborator

commented Sep 7, 2017

On git master:

>> Mail::AddressList.new("Dinâmica Equipe <test@example.com>")
=> #<Mail::AddressList:0x007f9325d330a0 @addresses=[#<Mail::Address:70134985757580 Address: |"Dinâmica Equipe" <test@example.com>| >], @group_names=[]>

@jeremy jeremy added this to the 2.7.0 milestone Sep 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.