From 05aaaefae7197cc79055a31843961dad6ce71555 Mon Sep 17 00:00:00 2001 From: Alex Puiu Date: Tue, 8 Feb 2022 16:59:33 +0200 Subject: [PATCH] find board from mail address if has multiple words. --- index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 77ac70a..81403c0 100644 --- a/index.php +++ b/index.php @@ -60,7 +60,10 @@ if ($emails) $overview = $inbox->headerInfo($emails[$j]); $board = null; - if(strstr($overview->to[0]->mailbox, '+')) $board = substr($overview->to[0]->mailbox, strpos($overview->to[0]->mailbox, '+') + 1); + if(strstr($overview->to[0]->mailbox, '+')) { + $board = substr($overview->to[0]->mailbox, strpos($overview->to[0]->mailbox, '+') + 1); + if(str_contains($board, '+')) $board = str_replace('+', ' ', $board); + } $data = new stdClass(); $data->title = DECODE_SPECIAL_CHARACTERS ? mb_decode_mimeheader($overview->subject) : $overview->subject;