|
|
@@ -638,6 +638,27 @@ class Zend_Mail_MailTest extends PHPUnit_Framework_TestCase
|
|
|
$this->assertContains("\r\n\r\n...after", $body, $body);
|
|
|
}
|
|
|
|
|
|
+ public function testZf10792CommaInRecipientNameIsEncodedProperly()
|
|
|
+ {
|
|
|
+ $mail = new Zend_Mail("UTF-8");
|
|
|
+ $mail->setFrom('from@email.com', 'Doe, John');
|
|
|
+ $mail->addTo('to@email.com', 'Döe, Jöhn');
|
|
|
+ $mail->setBodyText('my body');
|
|
|
+
|
|
|
+ $mock = new Zend_Mail_Transport_Mock();
|
|
|
+ $mail->send($mock);
|
|
|
+
|
|
|
+ $this->assertContains(
|
|
|
+ 'From: "Doe, John" <from@email.com>',
|
|
|
+ $mock->header
|
|
|
+ );
|
|
|
+
|
|
|
+ $this->assertContains(
|
|
|
+ 'To: =?UTF-8?Q?D=C3=B6e=2C=20J=C3=B6hn?= <to@email.com>',
|
|
|
+ $mock->header
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
public function testGetJustBodyText()
|
|
|
{
|
|
|
$text = "my body\r\n\r\n...after two newlines";
|