49f48340ac
The mail parser's MIME type fallback map only contained image types (jpg,
jpeg, png, gif, webp), causing attachments sent as application/octet-stream
(common with Lotus Notes and other legacy clients) to be stored with a NULL
type. This made PDFs and documents download instead of opening inline.
Extended $extMimeTypeMap with common document, archive and media types.
Also fixed getAttachmentFilenameExtension() which used explode('.')[1] to
get the extension — this returns the part after the *first* dot rather than
the last, breaking for filenames like "report.2024.pdf". Replaced with
pathinfo() which correctly extracts the final extension.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>