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;
}