none
DeliveryReceipt of Mail Item Send in VSTO

    Question

  • Hi,

    I am sending Mail from outlook 2007 in VSTO with some special business logic and add the information of send mail to my Database server.

    All works fine but one problem.

     I am not able to get DeliveryReceipt in vsto for whether all the receipts have received the mail or not, so that I may not enter the failed receipients to my Database server.

    (some thing like SMTP mail DeliveryNotificationOptions  )

    Thanks in advance.

    Thursday, December 27, 2012 7:32 AM

Answers

  • there is no direct feedback on sending mail - mail is placed in outbox folder and transport provider will eventually (big emphasis on eventually) pick it up and send it to mail server. Whole process is asynchronous by nature.

    There is also secon concern - you mention background threads - you cannot access _anything_ from OOM on background threads, not even read a single bool property there. If you do this - stop or you will have big problems with your code.

    Friday, December 28, 2012 1:03 PM

All replies

  • What is the exact problem that you are facing? Are you saying you are unable to read the delivery notications?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Thursday, December 27, 2012 1:41 PM
  • Sorry for late reply

    My main problem is just that when I create new mail from my VSTO (VS2010 for outlook 2007) I need the confirmation of mail delieverd  to all my receipients of current mail. 

    I am not able to get any type response regarding mail send  to receipients so that I can save information in my Database of current receipients, but not the failed receipients.

    Simple exmpale say:

    new mail Send to say A ,B recipient (in To).

    If mail send is sucess to A , but failed to B.

    Then I want to save mail send information in my Database only of A not of B.

    But I am unable to get response of mail send in VSTO

    This all my problem

    Friday, December 28, 2012 5:18 AM
  • how do you expect to get that feedback? if you set that option on outgoing email you should eventually get confirmations in your inbox (assuming recipient choose to send that confirmation). it is now up to you to correlate it somehow to your original outgoing mail. Is that what you were asking for?

    Friday, December 28, 2012 7:53 AM
  • Getting confirmation on mail back in InBox is not good options for me.

    The all the process of send the mail is in background in vsto, so due this it is not a good options for me to just  wait of Inbox mail because sending mail is in background thread and I am may end with multiple of thread waiting for mail response.

    I am just concern with getting a direct response for the mail.send().

    Friday, December 28, 2012 9:36 AM
  • there is no direct feedback on sending mail - mail is placed in outbox folder and transport provider will eventually (big emphasis on eventually) pick it up and send it to mail server. Whole process is asynchronous by nature.

    There is also secon concern - you mention background threads - you cannot access _anything_ from OOM on background threads, not even read a single bool property there. If you do this - stop or you will have big problems with your code.

    Friday, December 28, 2012 1:03 PM