Subject encoding problem
tsvetckovdmitriy opened this issue · comments
Problem: There is a problem when parsing the message header, sender and recipient.
Description:
I send messages using the library from Microsoft SmtpClient. The library has a feature where the Base64-encoded character code breaks into multiple lines. Microsoft forums
Example
begin
mail = Mail.new
mail.to = '=?utf-8?B?WFhYWFhYWCAtIDUgcGVyc29ubmVzIHZvdXMgb250IG5vbW3D?= =?utf-8?B?qSBndWlkZQ==?='
mail.from = '=?utf-8?B?WFhYWFhYWCAtIDUgcGVyc29ubmVzIHZvdXMgb250IG5vbW3D?= =?utf-8?B?qSBndWlkZQ==?='
mail.subject = '=?utf-8?B?WFhYWFhYWCAtIDUgcGVyc29ubmVzIHZvdXMgb250IG5vbW3D?= =?utf-8?B?qSBndWlkZQ==?='
puts mail.to
puts mail.from
puts mail.subject
end
Expected result:
XXXXXXX - 5 personnes vous ont nommé guide
XXXXXXX - 5 personnes vous ont nommé guide
XXXXXXX - 5 personnes vous ont nommé guide
Actual result:
XXXXXXX - 5 personnes vous ont nomm�� guide
XXXXXXX - 5 personnes vous ont nomm�� guide
XXXXXXX - 5 personnes vous ont nomm�� guide
In spite of this defect most of mail services can recognize these headers without problems. Can you fix this problem in this library?