moving messages to a Outlook folder

K

Kumar

Hello all,

I am trying to move new mails to a folder when they arrive in Outlook
Inbox folder by using ItemsEvents::ItemAdd method. The event fires
when an item is added to Inbox folder, but there are some problems to
be solved.

1. When the event fires I can access mail details but I can't move it
to folder, MailItem->Move() method giving access violation error. (I
think the error is because the mail is not yet saved in inbox)

2. Event fires whenever an item is added to Inbox folder i.e. even if
I move a message from different folder to Inbox it fires, this I
should avoid.

Is there any alternative methods to move new mails when they arrive in
inbox? or Is it possible in Application::NewMail event?

Please help

Kumar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top