Mailbox update
This commit is contained in:
@@ -8,7 +8,6 @@ class Emailinbox extends Renderer {
|
||||
public function __construct(?string $templateName = null) {
|
||||
parent::__construct();
|
||||
$folder = utf8_encode(urldecode(filter_input(INPUT_GET, 'folder'))) ?? 'INBOX';
|
||||
var_dump($folder);
|
||||
if (!$this->connectToImap($folder)) {
|
||||
$this->templateName = 'imaperror';
|
||||
}
|
||||
@@ -23,6 +22,9 @@ class Emailinbox extends Renderer {
|
||||
die();
|
||||
}
|
||||
$headers = $this->mbox->getMailsInfo($mailsIds);
|
||||
if (!$headers) {
|
||||
return [];
|
||||
}
|
||||
foreach ($headers as $header) {
|
||||
try {
|
||||
$date = \DateTime::createFromFormat('D, d M Y H:i:s O', str_replace([' (CET)', ' (CEST)', ' (UTC)'], '' , $header->date));
|
||||
|
||||
Reference in New Issue
Block a user