How to set Content-Type of attachment?

Does anyone know how I can set the Content-Type of an attachment of an outgoing mail?

I use Apple Mail, and with one correspondent I have this annoying problem that he never receives any excel or word attachments that I send (and possibly other ones, too).

Our support now says that I should try to set the Content-Type
of the excel attachments to "Content-Type: application/vnd.ms-excel".
Apple Mail seems to set it to
"Content-Type: application/octet-stream"
and they think that attachments with this content-type might get blocked by the mail server of my correspondent.

Any suggestions, ideas, etc., will be appreciated.

Best regards,
Gabriel.

MacBook Pro, Mac OS X (10.5.3)

Posted on Jun 26, 2008 2:57 AM

Reply
10 replies

Jun 30, 2008 1:13 PM in response to Barney-15E

Thanks a lot for your test.

Unfortunately, I get

Content-Type: application/octet-stream;

when I try to send an excel attachment to myself.

Below is the beginning of the email (in "source" format).

Any ideas why you get the correct mime-type, but I don't?

Regards,
Gabriel.


---------- beginning of email

Return-Path: <xxxxxxxxx@tu-clausthal.de>
Received: from [80.128.100.143] (account xxxxxxx HELO [192.168.2.100])
by tu-clausthal.de (CommuniGate Pro SMTP 5.2.4)
with ESMTPSA id 35503032 for xxxxxxxx@in.tu-clausthal.de; Mon, 30 Jun 2008 21:59:05 +0200
Message-Id: <B091FC34-289B-4D8F-BCC4-4DB0EC7A0DE1@tu-clausthal.de>
From: Gabriel Zachmann <xxxxxxxxxx@tu-clausthal.de>
To: Gabriel Zachmann <xxxxxxxxxxxx@in.tu-clausthal.de>
Content-Type: multipart/signed; boundary=Apple-Mail-13-325543015; micalg=sha1; protocol="application/pkcs7-signature"
Mime-Version: 1.0 (Apple Message framework v924)
Subject: test
Date: Mon, 30 Jun 2008 21:59:04 +0200
X-Mailer: Apple Mail (2.924)


--Apple-Mail-13-325543015
Content-Type: multipart/mixed;
boundary=Apple-Mail-12-325542957


--Apple-Mail-12-325542957
Content-Disposition: attachment;
filename="Kostenabfrage AVILUS Gesamt inklusive_TPxyz 080606.xls"
Content-Type: application/octet-stream;
x-mac-creator=5843454C;
x-unix-mode=0644;
x-mac-type=584C5338;
name="Gesamt.xls"
Content-Transfer-Encoding: base64

Jun 30, 2008 1:30 PM in response to GabrielZ

Okay, but did you actually setup RCDefault App to map Excel files to Excel? If not, that would explain why it says they're octet-stream files.

Try going to System Preferences > Default Apps > MIME Types and click on the application/excel item. Look at the popup menu to the right and see what item is listed as the default for opening those files; if it doesn't say Excel or some other compatible application like Numbers, then set it to one of those. Then logout and back in and try sending yourself another test message with an Excel file.

You might also consider using Zip to create a compressed archive and then try sending that via email; which should work if nothing else does.

Mulder

Jul 24, 2008 2:22 AM in response to Mulder

I have found that even though the main OS mime type mappings (as shown by MisFox for example) are correct for Word applications i.e application/msword, Mail still does not attach the correct mime type to outgoing Word attachments. Either Mail is using some other mime type mapping database (which I cannot locate) or something else is causing Mail not to find the correct mime type, and therefore just use the default application/octet-stream.

Has anybody got any ideas how to track down the problem?

Jul 24, 2008 3:57 AM in response to Tom Gewecke

You do not have to send the message, or put a signature on it, to find out what mime type is mapped to the attachment. Previously the mapping was evident as soon as you had attached the file by moving the mouse over the icon for the attached file. Now this initially gives a null type, but if you save the message as draft and then open the draft the mime type will be shown on moving the mouse over the attachment.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to set Content-Type of attachment?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.