Cancel sent item from the Sent Items folder events

Add-in Express™ Support Service
That's what is more important than anything else

Cancel sent item from the Sent Items folder events
 
Esteban Astudillo


Guest


I?Â?Ð?éve been looking at the OutlookFoldersEvents sample project to learn how to trap the events associated to the Sent Items folder. I?Â?Ð?ém looking to implement something similar to what is described by Brendon in this post:

http://www.add-in-express.com/forum/read.php?FID=5&TID=641&MID=3389&phrase_id=156894#message3389

The question, once the mail item makes it to the Sent Items folder is there a way to cancel the action? Of course I can do this in the ItemSend event but I don?Â?Ð?ét have access to the Sender?Â?Ð?és email address in that event. I understand that by capturing the folder?Â?Ð?és events I will have the sender?Â?Ð?és email address, but I haven?Â?Ð?ét found a way to cancel the event if a condition is met.

Any ideas on how to do this? (or similarly, any ideas on how to get the sender?Â?Ð?és email address in the ItemSend event?)
Posted 27 Mar, 2006 20:37:37 Top
Brad Smith




Posts: 49
Joined: 2005-11-22
Once the message hits Sent Items, it's already gone. Outlook moves it from the Outbox to Sent Items *after* the spooler has sent it out. So you can't cancel that.

There are mechanisms in place to get at the account info for the sender, but it gets tricky when you have multiple accounts. You might want to join one of the more generalized Outlook Dev forums, like Outlook-Dev in Yahoo Groups (http://groups.yahoo.com/group/outlook-dev). You're right that what you *really* need is a way to capture the sender's e-mail address in the OnSend event. That's not ADX-specific so you're more likely to get the info you need there. I'll be watching because I know my own code isn't doing that quite right either.

Brad.
Posted 28 Mar, 2006 10:18:15 Top
Esteban Astudillo


Guest


Thank you for the reference Brad. I will keep investigating over there.

Posted 28 Mar, 2006 10:45:53 Top