ZF-4890: Improvement on addTo(), addCc(), addBcc() of Zend_Mail

Description

_addRecipientAndHeader() function that is called from addTo(), addCc() and addBcc() functions, should be improved as following.

1) If $name is not used or the $name is same as $email, header is "To: $email".

2) If $name is used and the $name is encoded, header is "To: $name <$email>".

3) If $name is used and the $name is not encoded and not contains comma, header is "To: $name <$email>".

4) If $name is used and the $name is not encoded and contains comma, header is "To: "$name" <$email>".

Cf. setFrom() function in ZF-2043.

Comments

Solved in SVN r12485

Changing issues in preparation for the 1.7.0 release.