mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
Added IMAP body text limit
This commit is contained in:
parent
037f4dc61c
commit
0fc8967a7f
5 changed files with 59 additions and 10 deletions
|
|
@ -163,6 +163,11 @@ class Message
|
|||
*/
|
||||
private $iThreadsLen;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $bTextPartIsTrimmed;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
|
@ -229,6 +234,8 @@ class Message
|
|||
$this->iThreadsLen = 0;
|
||||
$this->iParentThread = 0;
|
||||
|
||||
$this->bTextPartIsTrimmed = false;
|
||||
|
||||
$this->sPgpSignature = '';
|
||||
$this->bPgpSigned = false;
|
||||
$this->bPgpEncrypted = false;
|
||||
|
|
@ -558,6 +565,14 @@ class Message
|
|||
$this->iParentThread = $iParentThread;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boole
|
||||
*/
|
||||
public function TextPartIsTrimmed()
|
||||
{
|
||||
return $this->bTextPartIsTrimmed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sFolder
|
||||
* @param \MailSo\Imap\FetchResponse $oFetchResponse
|
||||
|
|
@ -774,6 +789,15 @@ class Message
|
|||
foreach ($aTextParts as $oPart)
|
||||
{
|
||||
$sText = $oFetchResponse->GetFetchValue(\MailSo\Imap\Enumerations\FetchType::BODY.'['.$oPart->PartID().']');
|
||||
if (null === $sText)
|
||||
{
|
||||
$sText = $oFetchResponse->GetFetchValue(\MailSo\Imap\Enumerations\FetchType::BODY.'['.$oPart->PartID().']<0>');
|
||||
if (\is_string($sText) && 0 < \strlen($sText))
|
||||
{
|
||||
$this->bTextPartIsTrimmed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (\is_string($sText) && 0 < \strlen($sText))
|
||||
{
|
||||
$sTextCharset = $oPart->Charset();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue