PMC-347
This commit is contained in:
@@ -126,15 +126,14 @@ class ResponseReader
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Read all messages into an array
|
// Read all messages into an array
|
||||||
$mailsIds = $mailbox->searchMailbox('ALL');
|
$mailsIds = $mailbox->searchMailbox('UNSEEN');
|
||||||
if ($mailsIds) {
|
if ($mailsIds) {
|
||||||
$mailsInfo = $mailbox->getMailsInfo($mailsIds);
|
|
||||||
// Get the first message and save its attachment(s) to disk:
|
// Get the first message and save its attachment(s) to disk:
|
||||||
foreach ($mailsIds as $key => $mailsId) {
|
foreach ($mailsIds as $key => $mailsId) {
|
||||||
/** @var IncomingMail $mail */
|
/** @var IncomingMail $mail */
|
||||||
$mail = $mailbox->getMail($mailsId);
|
$mail = $mailbox->getMail($mailsId);
|
||||||
preg_match("/{(.*)}/", $mail->textPlain, $matches);
|
preg_match("/{(.*)}/", $mail->textPlain, $matches);
|
||||||
if ($matches && $mailsInfo[$key]->seen === 0) {
|
if ($matches) {
|
||||||
$dataEmail = G::json_decode(Crypt::decryptString($matches[1]), true);
|
$dataEmail = G::json_decode(Crypt::decryptString($matches[1]), true);
|
||||||
if (config("system.workspace") === $dataEmail['workspace']) {
|
if (config("system.workspace") === $dataEmail['workspace']) {
|
||||||
$this->case = $dataEmail;
|
$this->case = $dataEmail;
|
||||||
|
|||||||
Reference in New Issue
Block a user