mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 06:58:27 +03:00
Some IMAP RFC updates
This commit is contained in:
parent
33967c2319
commit
0b767bb373
3 changed files with 24 additions and 6 deletions
|
|
@ -118,16 +118,25 @@ trait Messages
|
|||
* @throws \MailSo\Net\Exceptions\Exception
|
||||
* @throws \MailSo\Imap\Exceptions\Exception
|
||||
*/
|
||||
public function MessageAppendStream(string $sFolderName, $rMessageAppendStream, int $iStreamSize, array $aAppendFlags = null, int &$iUid = null, int $iDateTime = 0) : ?int
|
||||
public function MessageAppendStream(string $sFolderName, $rMessageAppendStream, int $iStreamSize, array $aFlagsList = null, int &$iUid = null, int $iDateTime = 0) : ?int
|
||||
{
|
||||
$aData = array($this->EscapeFolderName($sFolderName), $aAppendFlags);
|
||||
$aParams = array(
|
||||
$this->EscapeFolderName($sFolderName),
|
||||
$aFlagsList
|
||||
);
|
||||
if (0 < $iDateTime) {
|
||||
$aData[] = $this->EscapeString(\gmdate('d-M-Y H:i:s', $iDateTime).' +0000');
|
||||
$aParams[] = $this->EscapeString(\gmdate('d-M-Y H:i:s', $iDateTime).' +0000');
|
||||
}
|
||||
|
||||
$aData[] = '{'.$iStreamSize.'}';
|
||||
/*
|
||||
// RFC 3516 || RFC 6855 section-4
|
||||
if ($this->IsSupported('BINARY') || $this->IsSupported('UTF8=ACCEPT')) {
|
||||
$aParams[] = '~{'.$iStreamSize.'}';
|
||||
}
|
||||
*/
|
||||
$aParams[] = '{'.$iStreamSize.'}';
|
||||
|
||||
$this->SendRequestGetResponse('APPEND', $aData);
|
||||
$this->SendRequestGetResponse('APPEND', $aParams);
|
||||
|
||||
$this->writeLog('Write to connection stream', LogType::NOTE);
|
||||
|
||||
|
|
@ -154,7 +163,7 @@ trait Messages
|
|||
|
||||
/**
|
||||
* RFC 3502 MULTIAPPEND
|
||||
public function MessageAppendStreams(string $sFolderName, $rMessageAppendStream, int $iStreamSize, array $aAppendFlags = null, int &$iUid = null, int $iDateTime = 0) : ?int
|
||||
public function MessageAppendStreams(string $sFolderName, $rMessageAppendStream, int $iStreamSize, array $aFlagsList = null, int &$iUid = null, int $iDateTime = 0) : ?int
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -68,6 +68,14 @@ class ESEARCH extends Request
|
|||
$sCmd = 'SEARCH';
|
||||
$aRequest = array();
|
||||
|
||||
/* // RFC 6203
|
||||
if (false !== \stripos($this->sCriterias, 'FUZZY') && !$this->oImapClient->IsSupported('SEARCH=FUZZY')) {
|
||||
$this->oImapClient->writeLogException(
|
||||
new RuntimeException('SEARCH=FUZZY is not supported'),
|
||||
Type::ERROR, true);
|
||||
}
|
||||
*/
|
||||
|
||||
$aFolders = [];
|
||||
if ($this->aMailboxes) {
|
||||
$aFolders[] = 'mailboxes';
|
||||
|
|
|
|||
|
|
@ -261,6 +261,7 @@ class MailClient
|
|||
);
|
||||
|
||||
// RFC 3516
|
||||
// Should mailserver decode or PHP?
|
||||
if ($sMailEncoding && $this->oImapClient->IsSupported('BINARY')) {
|
||||
$sMailEncoding = '';
|
||||
$sPeek = FetchType::BINARY_PEEK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue