mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
Displaying format=flowed e-mails (#276)
This commit is contained in:
parent
7a9ff78051
commit
f63edfa7cc
5 changed files with 61 additions and 8 deletions
|
|
@ -21,6 +21,7 @@ class Parameter
|
|||
const CHARSET = 'charset';
|
||||
const NAME = 'name';
|
||||
const FILENAME = 'filename';
|
||||
const FORMAT = 'format';
|
||||
const BOUNDARY = 'boundary';
|
||||
const PROTOCOL = 'protocol';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,6 +210,27 @@ class Part
|
|||
\MailSo\Mime\Enumerations\Header::CONTENT_LOCATION)) : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function IsFlowedFormat()
|
||||
{
|
||||
$bResult = false;
|
||||
if ($this->Headers)
|
||||
{
|
||||
$bResult = 'flowed' === \trim(\strtolower($this->Headers->ParameterValue(
|
||||
\MailSo\Mime\Enumerations\Header::CONTENT_TYPE,
|
||||
\MailSo\Mime\Enumerations\Parameter::FORMAT)));
|
||||
|
||||
if ($bResult && \in_array(\strtolower($this->MailEncodingName()), array('base64', 'quoted-printable')))
|
||||
{
|
||||
$bResult = false;
|
||||
}
|
||||
}
|
||||
|
||||
return $bResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue