Fixed issue #705

Change-Id: I602a88d24c2a482e6bebb5d6d7f4830843afec42
Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
SJ
2016-09-10 22:16:35 +02:00
parent 802c811a70
commit db1a202c5c
42 changed files with 1074 additions and 342 deletions

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Mail
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Mail.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id$
*/
@ -46,7 +46,7 @@ require_once 'Zend/Mime/Part.php';
*
* @category Zend
* @package Zend_Mail
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Mail extends Zend_Mime_Message
@ -209,7 +209,6 @@ class Zend_Mail extends Zend_Mime_Message
* Public constructor
*
* @param string $charset
* @return void
*/
public function __construct($charset = null)
{
@ -329,8 +328,10 @@ class Zend_Mail extends Zend_Mime_Message
/**
* Set the encoding of mail headers
*
* @param string $encoding Zend_Mime::ENCODING_QUOTEDPRINTABLE or Zend_Mime::ENCODING_BASE64
* @param string $encoding Zend_Mime::ENCODING_QUOTEDPRINTABLE or
* Zend_Mime::ENCODING_BASE64
* @return Zend_Mail Provides fluent interface
* @throws Zend_Mail_Exception
*/
public function setHeaderEncoding($encoding)
{
@ -378,7 +379,8 @@ class Zend_Mail extends Zend_Mime_Message
/**
* Return text body Zend_Mime_Part or string
*
* @param bool textOnly Whether to return just the body text content or the MIME part; defaults to false, the MIME part
* @param bool $textOnly Whether to return just the body text content or
* the MIME part; defaults to false, the MIME part
* @return false|Zend_Mime_Part|string
*/
public function getBodyText($textOnly = false)
@ -562,7 +564,8 @@ class Zend_Mail extends Zend_Mime_Message
}
/**
* Adds To-header and recipient, $email can be an array, or a single string address
* Adds To-header and recipient, $email can be an array, or a single string
* address
*
* @param string|array $email
* @param string $name
@ -583,7 +586,8 @@ class Zend_Mail extends Zend_Mime_Message
}
/**
* Adds Cc-header and recipient, $email can be an array, or a single string address
* Adds Cc-header and recipient, $email can be an array, or a single string
* address
*
* @param string|array $email
* @param string $name
@ -763,8 +767,8 @@ class Zend_Mail extends Zend_Mime_Message
/**
* Sets Default From-email and name of the message
*
* @param string $email
* @param string Optional $name
* @param string $email
* @param string $name optional
* @return void
*/
public static function setDefaultFrom($email, $name = null)
@ -796,6 +800,7 @@ class Zend_Mail extends Zend_Mime_Message
* Sets From-name and -email based on the defaults
*
* @return Zend_Mail Provides fluent interface
* @throws Zend_Mail_Exception
*/
public function setFromToDefaultFrom() {
$from = self::getDefaultFrom();
@ -813,8 +818,8 @@ class Zend_Mail extends Zend_Mime_Message
/**
* Sets Default ReplyTo-address and -name of the message
*
* @param string $email
* @param string Optional $name
* @param string $email
* @param string $name optional
* @return void
*/
public static function setDefaultReplyTo($email, $name = null)
@ -846,6 +851,7 @@ class Zend_Mail extends Zend_Mime_Message
* Sets ReplyTo-name and -email based on the defaults
*
* @return Zend_Mail Provides fluent interface
* @throws Zend_Mail_Exception
*/
public function setReplyToFromDefault() {
$replyTo = self::getDefaultReplyTo();
@ -961,9 +967,10 @@ class Zend_Mail extends Zend_Mime_Message
/**
* Sets Date-header
*
* @param timestamp|string|Zend_Date $date
* @param int|string|Zend_Date $date
* @return Zend_Mail Provides fluent interface
* @throws Zend_Mail_Exception if called subsequent times or wrong date format.
* @throws Zend_Mail_Exception if called subsequent times or wrong date
* format.
*/
public function setDate($date = null)
{
@ -1153,7 +1160,7 @@ class Zend_Mail extends Zend_Mime_Message
/**
* Return mail headers
*
* @return void
* @return array
*/
public function getHeaders()
{
@ -1264,7 +1271,7 @@ class Zend_Mail extends Zend_Mime_Message
return $email;
} else {
$encodedName = $this->_encodeHeader($name);
if ($encodedName === $name && strcspn($name, '()<>[]:;@\\,') != strlen($name)) {
if ($encodedName === $name && strcspn($name, '()<>[]:;@\\,.') != strlen($name)) {
$format = '"%s" <%s>';
} else {
$format = '%s <%s>';