how to send bulk mail using outlook vsto addin with certain amout of sleep between each mail id that are present in the to field? RRS feed

  • Question

  • hii,

     I'm developing a vsto addin where I need to send a bulk mail having 25 recipients.

    Is there a way to give a sleep between each recipient while I send the mail.

    for example, if there are 3 recipients in my To addresses field then the mail should get delivered to first recipient and after 10 seconds it should get delivered to 2nd recipient and again after 10 seconds it should get delivered to the third recipient.

    Is there a way to acheive this?

    Thanks and Regards



    Wednesday, May 18, 2016 12:28 PM


  • Hello Sudhir,

    You need to create a separate MailItem for each recipient in that case. Note, the item is not sent until you begin synchronizing user's folders using the specified Send\Receive group. The SyncObject.Start method can help.

    I'd suggest using secondary threads for implementing the required functionality. You can't use the Outlook object model from secondary threads, but you can use a low-level API  (Extended MAPI) which allows running such operations. For example, you can use any third-party wrappers around Extended MAPI such as Redemption. See MAPI Multithreading Rules for more information.


    Wednesday, May 18, 2016 1:26 PM