locked
E-mail bounce back script? RRS feed

  • Question

  •  

    Hi,

     

    I am wondering if ther is any way to run some script after Exchange server notice e-mail bounce back.

     

    I don't know much about Exchange, but what i would like to do is:

     

    1. Exchange sending many emails using one email account (email@email.com)

    2. Some of the email address are wrong and email@email.com get e-mail bounce back

     

    I would like to have something that will send wrong email address to webservice, so I can by the webservice remove that email from my list and don't use it next time.

     

    Any sugestions how something like that can be done?

     

    Thank you

    Friday, September 19, 2008 12:03 AM

All replies

  • What version of exchange?

     

    One way to do this is to have an NT service or something like that create a pull subscription and call GetEvents (in Exchange Web Services) every once in a while and look for NDR reports (by item class).  Then your app could update your contacts folder to remove the bad contact in question

    Friday, September 19, 2008 7:11 PM
  • Hi,

     

    Thank you for quick respond. Do you have some code example of that. I beleve it should be something like that to connect to the server.


                ExchangeServiceBinding esb = new ExchangeServiceBinding();
                esb.Credentials = new NetworkCredential("<username>", "<password>", "<domain>");
                esb.Url = @"https://<FQDN>/EWS/Exchange.asmx";

    but I can not find eny examle of code what to do next. How to read NDR reports?

     

    Thank you

    Sunday, September 21, 2008 10:41 PM