What are the difference between a .msg file and a .eml file?
Is there anything that msg is capable and which eml is not and vice versa?
MSG is a binary OLE storage file (IStorage). Unlike MIME (EML), it stores all MAPI specific properties that MIME cannot store. It's format is documented by Microsoft. You can look inside an MSG file on the IStorage
level using a utility like SSViewer. On the MAPI level, you can open/create an MSG file using StgOpenStorage / StgCreateStorageEx and OpenIMsgOnIStg functions. You can see properties stored inside an MSG file in OutlookSpy (click OpenIMsgOnIStg button).
EML files are text files in the MIME format (you can open a file like that in Notepad).
To create an EML file, you can either
Create it explicitly in your code one MIME header/part at a time.
If you are using Extended MAPI in C++ or Delphi, you can use the IConverterSession interface that wraps the native Outlook converter. You can play with it in OutlookSpy - click IConverterSession button on the OutlookSpy toolbar.
You can use Redemption and its RDOMail.SaveAs(..., olRfc822)
/ SafeMailItem.SaveAs(..., olRfc822)
methods.