I have an mail-in database where the mailDoc is a table of values retrieved from the incoming email. Nothing special, it just makes it easier to work with this way. I have a scheduled agent that reads these incoming emails and processes them to determine validity of attachments and client names. When I encounter an invalid attachment, I need to send an email to the sender with a copy of the original email (everything in the table) under some text that I have created explaining the error.
I have tried to use RenderToRTItem and set it to the existing Body field on this new (outgoing) email. From what the Help doc states, RenderToRTItem requires that I save the email prior to using this function. The problem is I do not want to save these emails.
RenderToRTItem, without a save, did retrieve the attachment from the mailDoc and placed it under a line on the email, but I need to retrieve the entire form not just the attachment.
How do I retrieve all of the data from the mailDoc form, place it into the Body field on the memoDoc under text that is already added?
You (likely) won't be able to work around the requirement to save the document first, but why not save the document and then delete it later? You could set an item on the document "ToBeDeleted" and then create another scheduled agent to delete all documents having that item.