Changes for #342

This commit is contained in:
the-djmaze 2022-04-22 14:51:18 +02:00
parent 2b97db659a
commit af3d0dcb00
3 changed files with 11 additions and 0 deletions

View file

@ -106,6 +106,8 @@ class MailClient
MimeHeader::AUTHENTICATION_RESULTS, MimeHeader::AUTHENTICATION_RESULTS,
MimeHeader::X_DKIM_AUTHENTICATION_RESULTS, MimeHeader::X_DKIM_AUTHENTICATION_RESULTS,
MimeHeader::LIST_UNSUBSCRIBE, MimeHeader::LIST_UNSUBSCRIBE,
// https://autocrypt.org/level1.html#the-autocrypt-header
MimeHeader::AUTOCRYPT,
// SPAM // SPAM
MimeHeader::X_SPAM_STATUS, MimeHeader::X_SPAM_STATUS,
// MimeHeader::X_SPAM_FLAG, // MimeHeader::X_SPAM_FLAG,

View file

@ -73,6 +73,9 @@ class Message implements \JsonSerializable
$sReadReceipt = '', $sReadReceipt = '',
// https://autocrypt.org/level1.html#the-autocrypt-header
$sAutocrypt = '',
$aUnsubsribeLinks = array(), $aUnsubsribeLinks = array(),
$aThreads = array(), $aThreads = array(),
@ -472,6 +475,8 @@ class Message implements \JsonSerializable
$oMessage->aDraftInfo = array($sType, $iUid, $sFolder); $oMessage->aDraftInfo = array($sType, $iUid, $sFolder);
} }
} }
$oMessage->sAutocrypt = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::AUTOCRYPT);
} }
else if ($oFetchResponse->GetEnvelope()) else if ($oFetchResponse->GetEnvelope())
{ {
@ -648,6 +653,7 @@ class Message implements \JsonSerializable
'Threads' => $this->aThreads, 'Threads' => $this->aThreads,
'UnsubsribeLinks' => $this->aUnsubsribeLinks, 'UnsubsribeLinks' => $this->aUnsubsribeLinks,
'ReadReceipt' => '', 'ReadReceipt' => '',
'Autocrypt' => $this->sAutocrypt,
'Attachments' => $this->oAttachments ? $this->oAttachments->SpecData() : null, 'Attachments' => $this->oAttachments ? $this->oAttachments->SpecData() : null,

View file

@ -88,5 +88,8 @@ abstract class Header
IMPORTANCE = 'Importance', IMPORTANCE = 'Importance',
X_PRIORITY = 'X-Priority', X_PRIORITY = 'X-Priority',
// https://autocrypt.org/level1.html#the-autocrypt-header
AUTOCRYPT = 'Autocrypt',
LIST_UNSUBSCRIBE = 'List-Unsubscribe'; LIST_UNSUBSCRIBE = 'List-Unsubscribe';
} }