Tim Smet
Posts: 37
Joined: 2015-10-06
|
Hi,
We use the adxOutlookAppEventsItemSend event to detect if a certain word in the email is written ("attachment"). If this is the case and there are no "real" attachments present we ask the user if he is sure to send the email while he mentioned "attachment" yet no attachments are present. (if they say no we set cancel to true).
Now the problem:
While typing an email and saveing the mail (before sending) and then looking at PR_HTML of the email (or htmlbody) you'll see it contains word html css etc from office (word) as well as _MailAutoSig bookmark when there is a signature added or _orignalmail bookmark. We thought we could use these to limit the searching area for the word "attachment" to only what the user had typted in his current email and ignore attachments or original mails when using forward / reply.
The problem is the html is changed while being in the itemsend event it does not contain those bookmarks anymore. The html has been converted from office like html to regular html as is suggested here: https://social.msdn.microsoft.com/Forums/office/en-US/af4a6ece-d9a3-485e-a087-3e7bdf70d6a5/mailautosig-bookmark-missing-outlook-2010?forum=outlookdev
How should this be done so that we ignore the text from signature / original mails if the html is already changed in itemsend event and those bookmarks don't exist anymore?
thanks |
|
Dmitry Kostochko
Add-in Express team
Posts: 2875
Joined: 2004-04-05
|
Hi Tim,
I am afraid you can detect where the original email body begins only by using indirect indications. For example, you can try to search for the "From:" text wrapped into <b></b> tags, or search for text that the ConversationTopic property contains. One more option to try is the received date of the original email, this information is also added to the header of the original email. |
|