From 7abdd5940dd1b0ed1873538ea91d31fba87b1a3d Mon Sep 17 00:00:00 2001 From: Torsten Schulz Date: Mon, 3 Jul 2023 12:50:58 +0200 Subject: [PATCH] rebuild read out email --- include/emailinbox.php | 2 +- include/mail.php | 5 ++++- include/mailhandling.php | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/emailinbox.php b/include/emailinbox.php index 571108a..485eb86 100644 --- a/include/emailinbox.php +++ b/include/emailinbox.php @@ -55,7 +55,7 @@ class Emailinbox extends Renderer { array_walk($headers, function(&$item, $key) { $newItem = ''; $newItem .= '' . ($item['date'] === false ? '' : $item['date']->format('d.m.Y H:i:s')) . ''; - $newItem .= '' . ($item['unread'] === 'U' ? '' : '') . $item['title'] . ($item['unread'] === 'u' ? '' : '') . ''; + $newItem .= '' . ($item['unread'] === 'U' ? '' : '') . $item['title'] . ($item['unread'] === 'u' ? '' : '') . ''; $newItem .= '' . $item['from'] . ''; $newItem .= ''; $item = $newItem; diff --git a/include/mail.php b/include/mail.php index ae91dbf..c8a72e5 100644 --- a/include/mail.php +++ b/include/mail.php @@ -4,6 +4,7 @@ require 'mailhandling.php'; class Mail extends Mailhandling { // protected $mbox = null; + protected $folder = ''; protected $uid = 0; public function __construct(?string $templateName = null) { @@ -12,7 +13,9 @@ class Mail extends Mailhandling { $this->templateName = 'imaperror'; return; } - $this->uid = $this->getUriParams()['uid']; + $params = $this->getUriParams(); + $this->uid = $params['uid']; + $this->folder = $params['folder']; $this->content['uid'] = $this->uid; } diff --git a/include/mailhandling.php b/include/mailhandling.php index 229f8c7..617c6eb 100644 --- a/include/mailhandling.php +++ b/include/mailhandling.php @@ -5,7 +5,7 @@ class Mailhandling extends Renderer { public function __construct() { parent::__construct(); - if (!$this->connectToImap()) { + if (!$this->connectToImap($this->folder)) { $this->templateName = 'imaperror'; return; }