From f99fa80a3f2bbf42258e2aa5434668cce44a4e55 Mon Sep 17 00:00:00 2001 From: Torsten Schulz Date: Mon, 10 Jul 2023 11:59:00 +0200 Subject: [PATCH] Mail update --- include/mailhandling.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/mailhandling.php b/include/mailhandling.php index cf879b6..8305773 100644 --- a/include/mailhandling.php +++ b/include/mailhandling.php @@ -13,8 +13,11 @@ class Mailhandling extends Renderer { protected function fetchEmail(): PhpImap\IncomingMail { $mailsIds = $this->mbox->searchMailbox('ALL'); - var_dump($mailsIds); - $mail = $this->mbox->getMail($mailsIds[0]); + if (!in_array($this->uid, $mailsId) { + echo 'nicht auffindbar'; + die; + } + $mail = $this->mbox->getMail($this-uid); var_dump($mail); return $mail; }