I have a need to generate documents and send them to a email address. Once the document has been sent I don't actually care about the generated document, oh and it has to be a document, formatted HTML emails don't meet the requirements.
Because the documents need to be templated I'd like to set up a library with a default document template that uses smart so that I can create a new item in the library using the API, set the metadata for the document and have the content set how I need it for this document instance.
I'd then attach the file to a email and send it.
Once the email is sent I'd like to delete the item from the library to make sure I'm not storing things I don't need to.
The question is will SharePoint manage this deletion properly and ensure that my content DB doesn't grow due to documents that have been deleted?