mikel/mail — Issue #290: Failed to parse RFC2822 name-addr From header?
Author: OhaiBBQ
Created: 2011-10-10 05:34:01+00:00
State: open

It seems that Mail cannot parse the name-addr spec which is a phrase inside a set of square brackets followed by a space and the angle-addr spec.

irb(main):019:0> m = Mail.new
=> #
irb(main):020:0> m["From"] = "[display name] "
=> "[display name] "
irb(main):021:0> m["From"]
=> #", #|
Reason was: Expected one of
, (, !, #, $, %, &, ', *, +, -, /, =, ?, ^, _, `, {, |, }, ~, ", ., <, , at line 1, column 1 (byte 1) after
>]], @charset="UTF8", @tree=nil, @length=nil, @value="[display name] ", @element=nil, @name="From">>