title: How to attach a file to an email using SQL stored procedure?
body: <p>Can't seem to find much information about how to attach a file that's been stored as a BLOB as part of an email. </p>
  
  <p>I know you can attach files from the file system (C:\temp...) to email that are being setup in DBMAIL or custom stored procedures. However, I haven't seen any references to attaching something such as a PDF that's been stored as a binary object in a table.</p>
  
  <p>I see where you can attach a query as a file, but I don't think that's what I'm looking for.</p>
  
  <p>We would do this programatically via the application, but we need to be able to kick this SP via triggers or the application's server side code.</p>
  
  <p>Is this possible or should i be asking other questions, since usually a binary object also needs to have a content type associated with it for browsers or mail objects to know how to handle?</p>