Here's an idea that I have had but never got around to implementing it , try it out it may be a good work around solution:
- Create an object for unsent emails
- Create a process that creates an object for each file in the AwareIM\ USENT_EMAIL\ folder
- Run the process periodically
a. when the object is created have a rule that calculates and stores the filename and path to the file
b. Once you know the the file name after the object is created insert the contents of the file in the UNSENT_EMAIL .Text attribute using URL_CONTENTS('file:///C:/AwareIM/UNSENT_EMAIL/<<UNSENT_EMAIL.Filename>>.txt')
c. Now that you have the contents of the failed email text in in your UNSENT_EMAIL object , decipher the ID of the email it is related to using a combination of WORDS FROM LEFT, WORDS FROM RIGHT and SUBSTRING if neccessary (make sure when you send emails you embed the ID of the email into the message somewhere)
d . Link the UNSENT_EMAIL object to the OutgoingEmail object using the deciphered OutgoingEmail.ID and present the Failed Status
e . Delete the unsent email file in AwareIM\UNSENT_EMAIL\
So if the OutgoingEmail.Status is not set to failed assume that it has been sent
hope that makes sense, let me know what you think