title: Creating and showing e-mail on Windows with maximal e-mail client compatibility
body: <p>I need to create an executable that can be called from the command line which will create an e-mail, attach files to the e-mail and show the e-mail to the user so that they can complete the e-mail and send it. This should be done in the e-mail client that the user has configured as their default.</p>
  
  <p>This needs to work for as many e-mail clients as possible. The ones I'm aware of that are used most are Outlook 2007-2010, Outlook Express, Windows Live Mail and Thunderbird. I'll target .NET 2.0 so that it does not require a newer .NET to be installed if the user is using Vista.</p>
  
  <p>Simple MAPI is capable of doing the above, but Outlook 2007+ does not support it. All the other mail clients on the list do support Simple MAPI. I get the impression that Outlook is the only client that uses Extended MAPI and that Extended MAPI is tricky to use, so it's better to just use the Outlook COM API instead of Extended MAPI.</p>
  
  <p>First the program will look for Outlook and use the Outlook COM API to perform the above if Outlook is available. I'll implement this component in VB and use late binding so that I'm not compiling against a specific version of Outlook. Then, if Outlook is not found it will fall back to Simple MAPI and attempt to use it.</p>
  
  <p>Because of all this decision-making in the code I'll make this program log its activity so that we can debug what is happening on the user's machine when it doesn't work.</p>
  
  <p>Will this approach work? Do you know a better approach? My goal is to maximize compatibility.</p>
  
  <p>EDIT</p>
  
  <p>It looks like Outlook 2007+ does support Simple MAPI, but if you're running the 64 bit version then a 32 bit executable can't call it. I'll stick with the above plan for that reason.</p>