title: Creating an email in Java
body: <p>I would like to "create" an email using Java. </p>
  
  <p>Here's what I mean:</p>
  
  <p>Based on information I already have, I would like to make an email message open in Microsoft Outlook with the fields To, CC, Subject, Message Body, and attachments already populated (all now stored as strings, the directories for attachments are stored as strings as well). </p>
  
  <p>The message needs to open in Outlook for the user to verify the contents and give the opportunity for adding more CC, slight adjustments to subject and message body.</p>
  
  <p>From what I gather, it seems that the "best" way of achieving this is first creating a file on disk that Outlook can read, which contains my message, then opening it with outlook using something similar to the code below.</p>
  
  <pre><code>Runtime rt = Runtime.getRuntime();
  Process pr = rt.exec("OUTLOOK Directory + CMD switches for opening files");
  </code></pre>
  
  <ol>
  <li><p>Ideally, I would like to use a simple framework for simply creating such a file using the strings I already have for the different fields (or achieving the same thing through a a non-simple framework). </p></li>
  <li><p>If there's no "good" way of achieving the above, I'd settle for a method of just attaching my attachment file to a given Outlook template (.oft) file.</p></li>
  </ol>
  
  <p>(3. I'll resort to my current solution of simply having the template open in Outlook, the attachment in Explorer, and prompt the user to drag the file into Outlook.)</p>
  
  <p>I've looked at HSMF in Apache POI (I'm Apache POI for other parts of my program), but it appears to be rather experimental at this point, and I've been unable to find much documentation for it.</p>
  
  <p>Does anyone have any suggestions on where to look?</p>