title: add attachment as stream in commons email
body: <p>I am using <a href="http://commons.apache.org/email/" rel="noreferrer">Apache Commons Email</a> in my web-application and it works fine.</p>
  
  <p>Now that I need to send a document by attachment, I am facing some problems. I need to get the file from the database (as a BLOB) and add it as an attachment. It seems like Commons Email does not support stream attachment and it only takes a file from a path.</p>
  
  <p>I need to know what is the best practice here?</p>
  
  <ol>
  <li>Do I need to save the file in the directory structure also, so that
  it works fine with Commons Email?, or, </li>
  <li>Is there any way I can use the
  streamed content itself to add as an attachment?</li>
  </ol>