/**
* Filter of other data
*
* @param string $data
* @return string
*/
protected function _filterOther($data)
{
$rule = array("\r" => '',
"\n" => '',
"\t" => '',
);
return strtr($data, $rule);
}
/**
* Formats e-mail address
*
* @param string $email
* @param string $name
* @return string
*/
protected function _formatAddress($email, $name)
{
if ($name === '' || $name === null || $name === $email) {
return $email;
} else {
$encodedName = $this->_encodeHeader($name);
if ($encodedName === $name && strcspn($name, '()<>[]:;@\\,."') < strlen($name)) {
$format = '"%s" <%s>';
} else {
$format = '%s <%s>';
}
return sprintf($format, $encodedName, $email);
}
}
}