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?)
|
|
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. |
|
Esteban Astudillo
Guest
|
Thank you for the reference Brad. I will keep investigating over there.
|
|