HOW IT WORKS: Why my MSG files are getting converted to inline attachments ?
You might have faced this issue if you have used Outlook to send emails to SMTP recipients (non-exchange). Whenever you attach any MSG file to attachments it gets converted to inline attachment for the recipients. It made my colleague Akash worried why its happening and I have to explain him Why.
Here is the story...
Outlook and Exchange both are responsible for content conversation on the basis of protocol being used. If it’s MAPI (Outlook connecting to Exchange), Outlook will not touch the MSG file and sent it as-is while in the case of SMTP it will convert the MSG file into rfc822, send the email in MIME format and attach the rfc822 onto it. Similarly, when you use OWA to send email and attach MSG file to the it, it is not converted as OWA sends the mail in MIME and not MAPI format. While OWA sends the email in MIME it attach the MSG file as application/octet-stream instead of text/rfc822
I will try to explain in scenario basis
1) Outlook <-> Exchange
You created a new email message and sent it to Exchange for local delivery (same server/mailbox) the attached MSG file is not converted and delivered as-is, end result will be you see it as attached
2) Outlook =>(via MAPI)=>Exchange=> SMTP (Gmail / Hotmail/Another Exchange Server)
In this scenario the protocol is SMTP, even if Exchange is connecting to another Exchange. SMTP mails are always in rfc822, this time the responsibility of content conversion is not of Outlook because it is handing over the MSG to Exchange who can understand and convert the message if required. The content conversion takes place at Exchange’s end when the email is leaving Exchange and comes to SMTP protocol. This time exchange will convert the MSG to html email and wrap it in a rfc822 message. Gmail/Hotmail being HTML clients and capable of handling rfc822 format will read through the rfc822 and display it’s content.
3) Outlook=>(via SMTP)=>Gmail/Hotmail
There is no exchange and Outlook cannot be sure that the recipient of MSG file will be able to interpret is because the protocol is SMTP. So it’s a logical responsibility of Outlook to convert its proprietary format into standard format which can be understood by SMTP clients , rfc822. Copy-Paste from above scenario, This time Outlook will convert the MSG to html email and wrap it in a rfc822 message. Gmail/Hotmail being HTML clients and capable of handling rfc822 format will read through the rfc822 and display it’s content.
So it is entirely up to the client at recipients’ end how to interpret the rfc822 and display it. If you use Outlook to download the same email from Gmail’s Inbox ,the one which shows as inline in Gmail, will be rendered as attachment in Outlook. Why does CDOSYS or OWA plays different role with same MSG file??? because it does not know how to handle MSG files. CDOSYS and OWA sends email in MIME, for them it is just another binary file which is attached as application/octet-stream to MIME message.
If you still have any questions, feel free to contact me.