Open
Description
Problem:
- GenericHeader loads the header in file, decodes it to utf-8
- the Headers::get attempts to Lazy-Load "To" header class
Lazyload does stringify and load in from string
$encoding = $current->getEncoding();
$headers = $class::fromString($current->toString());
However, toString does not encode comma
AND To header class does split on comma!
see \Zend\Mail\Header\AbstractAddressList::fromString
this PR shows only the problem.
Originally posted by @glensc at zendframework/zend-mail#146