drl1
asked on
Processing undeliverable emails/dead email addresses
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.
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.
ASKER
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?
Can you provide an example of event sink code?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, I'll give this a try when I find some time over the next week or so.
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.Appl
Set objNameSpace = objoutlook.GetNamespace("M
'Get the secondary mailbox
Set objMailboxName = objNameSpace.Folders(cmMai
Set objInboxItems = objMailboxName.Items
Set objDestinationFolder = objMailboxName.Folders("Hi
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