Start a conversation

PDF attachment is displayed as XLS in Webmail

Overview

While receiving an email with PDF attachment in Webmail, the file is being displayed as XLS, so-called  Spreadsheets format, despite the correct .pdf extension.

webmail_attachment_pdf.jpg

Kerio Connect Webmail displays a spreadsheet icon.

Diagnosis

While reviewing the source of the affected email, the Content-Type header appears to be set incorrectly as application/vnd.ms-excel. The example:

  Content-Type: application/vnd.ms-excel; name="=?UTF-8?Q?Zam=C3=B3wienie?=.pdf"

This type of attachment is the MIME type associated with the .xls file extension. However, the file name contains the .pdf extension, and it is indeed a PDF file.

Modern Outlook clients and browsers will handle this mismatch between MIME type and file extension differently:

  • Microsoft Outlook and Apple Mail both treat the file as PDF.
  • Webmail on Google Chrome, Edge, and Apple Safari will assign the .xls extension to the file when downloading, complying with the Content-Type header.
  • Webmail on Mozilla Firefox, however, will download the file as PDF.

Solution

The Content-Type header is generated on the sender's client. Depending on the browser, the Webmail will handle extension and file type mismatch differently. You can perform the following actions as a workaround:

  • Open Webmail on Firefox in order to download the file as PDF;
  • Manually change the file extension after downloading the file;
  • Configure a mail client such as Outlook to receive emails;

    For more information, please refer to Installing the Kerio Outlook Connector or configuring EWS on Outlook for Mac

  • Ask the sender to re-send the attachment again after fixing the Content-Type header.
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted
  3. Updated

Comments