rebuild read out email
This commit is contained in:
@@ -55,7 +55,7 @@ class Emailinbox extends Renderer {
|
||||
array_walk($headers, function(&$item, $key) {
|
||||
$newItem = '<tr>';
|
||||
$newItem .= '<td style="white-space:nowrap">' . ($item['date'] === false ? '' : $item['date']->format('d.m.Y H:i:s')) . '</td>';
|
||||
$newItem .= '<td><a href="mail?uid=' . $key . '">' . ($item['unread'] === 'U' ? '<b>' : '') . $item['title'] . ($item['unread'] === 'u' ? '</b>' : '') . '</td>';
|
||||
$newItem .= '<td><a href="mail?folder=' . $this->folder . '&uid=' . $key . '">' . ($item['unread'] === 'U' ? '<b>' : '') . $item['title'] . ($item['unread'] === 'u' ? '</b>' : '') . '</td>';
|
||||
$newItem .= '<td>' . $item['from'] . '</td>';
|
||||
$newItem .= '</tr>';
|
||||
$item = $newItem;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user