X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/fbeede6b78751daa3758b33181cd0e3c070713d1..1900f80a9ab5fe401d6901b8e17ee82131b1170d:/mail/index.php diff --git a/mail/index.php b/mail/index.php index ce133c5..b4846cc 100644 --- a/mail/index.php +++ b/mail/index.php @@ -6,8 +6,10 @@ function parsemailhead($headerdata) { $headlist = iconv_mime_decode_headers($headerdata, ICONV_MIME_DECODE_CONTINUE_ON_ERROR); $headlist['date'] = DateTime::createFromFormat(DateTimeInterface::RFC2822.'+', $headlist['Date']); - $headlist['from'] = mailparse_rfc822_parse_addresses($headlist['From']); - //TODO: imap_rfc822_parse_adrlist() alternative + $headlist['from'] = imap_rfc822_parse_adrlist($headlist['From'], ''); + array_walk($headlist['from'], function ($row) { + $row->display = $row->personal ?? $row->mailbox; + }); return $headlist; } @@ -21,7 +23,7 @@ if ($msgid) { print '