Solved

Processing undeliverable emails/dead email addresses

Posted on 2011-09-10
4
833 Views
Last Modified: 2012-11-16
Sending bulk email (subscriber base of over 100,000 recipients) using SQL Stored Procedures through Exchange 2007 and Exchange 2003. How is it possible to parse undeliverable messages/NDRs in order to strip out the original recipient address and automatically flag it in the original SQL record so that no further emails are sent to that address?

I've previously read about Exchange event sinks and intercepting the inbound NDR to strip out the email address and process it, however I'm wondering if this is the best solution or if anyone has ideas of how else to achieve this.
0
Comment
Question by:drl1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 12

Expert Comment

by:FarWest
ID: 36516110
you can do that by making a c# using the event sink, by registering it to Exchange web services and be notified when new email comes and check its type,
but since it is like "house keeping" job, and I don't think that you need realtime to this type of maintinance operations, what you can do is to access the Inbox of the account the will receive the NDR, and process whatever emails in it, you can use even vbscript and put it in the the server tasks
check this page as startup, this example to move rhe messages, and you need it so when you finished the prcessed emails it better to move them in some kind of history
Code:Sub MoveToHistorikk()

Dim objNameSpace As Outlook.NameSpace
Dim oexpSource As Outlook.Explorer
Dim objInboxItems As Object
Dim objMailboxName As Outlook.MAPIFolder
Dim cmMailBoxName As String
   
    'Name of secondary mailbox
    cmMailBoxName = "Postboks - Van Maskinalarm"
   
    'All mailboxes are children of this folder
    Set objoutlook = CreateObject("Outlook.Application")
    Set objNameSpace = objoutlook.GetNamespace("MAPI")
         
    'Get the secondary mailbox
    Set objMailboxName = objNameSpace.Folders(cmMailBoxName)
    Set objInboxItems = objMailboxName.Items
   
    Set objDestinationFolder = objMailboxName.Folders("Historikk")
    Set oexpSource = Application.ActiveExplorer
   
    ' Move selection to Historikk
    For Each objInboxItems In oexpSource.Selection
      If TypeOf objInboxItems Is Outlook.MailItem Then
        objInboxItems.Move objDestinationFolder
      End If
    Next
   
    'Cleaning
    Set objNameSpace = Nothing
    Set objInboxItems = Nothing
    Set objMailboxName = Nothing
    Set objDestinationFolder = Nothing
    Set oexpSource = Nothing
End Sub

http://www.bigresource.com/VB-Moving-an-E-mail-from-inbox-to-another-folder-for-secondary-mail-account-75Gceh4hpI.html
 
0
 

Author Comment

by:drl1
ID: 36516123
Thanks for that. It does actually need to be close to real-time as we may send more than one email per day to certain subscribers, so if the 1st one bounces, we should avoid sending the 2nd and any subsequent emails.

Can you provide an example of event sink code?
0
 
LVL 12

Accepted Solution

by:
FarWest earned 500 total points
ID: 36516151
ok,
it is called the notification services, so your code will be notified when any new messages arrived  and you can process the new messages, I have used that in my code as windows services and it works fine, but sometimes the link is broken and you have to restrat the services, since exchange has a machanizm that if the client did not response for the notification for certin time it will disconnect and do not send any notification,
also you have to take care of the firewall on the machine that runs the service so it will  allow incoming calles on that port "using netsh"

http://msdn.microsoft.com/en-us/library/bb204063(v=exchg.80).aspx

good luck
0
 

Author Comment

by:drl1
ID: 36516166
Thanks, I'll give this a try when I find some time over the next week or so.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question