locked
IMAP Copy Mail RRS feed

  • Question

  • Hi All,

    For displaying a specific mail (according to EntryID) in Outlook 3rd pane, we are copying that mail and placing/moving copied mail to current folder and then we are using Late binding functions (AddToSelection/ClearSelection).   For POP3 mails, it's working fine, but with IMAP mails, we have the following problems as:

    1. If we go with .copy/.move function, then it takes long time to copy and move as approx. 5-7 seconds, so we are creating a physical message as ".msg" file and storing on local machine and then loading that newly created message, but this also taking little time to process as approx. 1-2 seconds, which is not good.
    2. While doing the process as creating message ".msg", Outlook is going into unstable state, means for 1-2 seconds Outlook is going to "Not Responding" state.
    So can you please suggest us how we can copy/move specific mail and then previewing into Outlook 3rd pane without any delay and without Outlook unstable state.
    Thanks,
    Karan Kumar

    Tuesday, December 6, 2011 7:18 AM

Answers

  • I cannot write the code for you Karan, that's your job I'm afraid.  There are plenty of resources in MSDN on using multiple threads.  You should also contact Dmitry Streblechenko for support with Redemption (http://www.dimastr.com).

    However, the basics of using multiple threads with Redemption is to ensure that you create new instances of your RDOSession object only after the thread has been fired.  You also need to set RDOSession.MAPIOBJECT to Outlook.NameSpace.MAPIOBJECT (your NameSpace object most be obtained from the Outlook.Application object passed by the Add-in's Initialize event).  Set your RDOSession variable to null when the thread is finished.


    Eric Legault
    MVP (Outlook)
    About me...
    • Marked as answer by 许阳(无锡) Monday, December 26, 2011 12:29 PM
    Wednesday, December 7, 2011 5:48 PM

All replies

  • IMAP is not the most performant e-mail protocol and delays are inevitable, in my experience.  Performance improvements have been made in Outlook 2010, but also make sure Outlook 2007 is fully up to date with the latest patches and service packs.  The only other thing I could recommend is to use Redemption on a second thread to process these e-mails.  Note that you cannot use the Outlook Object Model in multi-threaded operations.
    Eric Legault
    MVP (Outlook)
    About me...
    Tuesday, December 6, 2011 2:50 PM
  • Hello Eric,

     

    Thanks for your reply.

     

    Can you please give me a reference or write a code snippet for "Redemption on a second thread to process these e-mails", so that I can get the exact thing.

     

    Thanks,

    Karan Kumar

    Wednesday, December 7, 2011 6:25 AM
  • I cannot write the code for you Karan, that's your job I'm afraid.  There are plenty of resources in MSDN on using multiple threads.  You should also contact Dmitry Streblechenko for support with Redemption (http://www.dimastr.com).

    However, the basics of using multiple threads with Redemption is to ensure that you create new instances of your RDOSession object only after the thread has been fired.  You also need to set RDOSession.MAPIOBJECT to Outlook.NameSpace.MAPIOBJECT (your NameSpace object most be obtained from the Outlook.Application object passed by the Add-in's Initialize event).  Set your RDOSession variable to null when the thread is finished.


    Eric Legault
    MVP (Outlook)
    About me...
    • Marked as answer by 许阳(无锡) Monday, December 26, 2011 12:29 PM
    Wednesday, December 7, 2011 5:48 PM