Handling Returned Emails

jaydwest

JayW
Local time
Yesterday, 23:28
Joined
Apr 22, 2003
Messages
340
I have an Ecommerce Client who wants to send Emails to his Customers about promotions. (It's no SPAM Honest. His Customers click a checkbox saying they want to know about promotions).

I created the code to do this and it works perfectly until an email is returned. The returned email stays in the inbox and displays an error message with each succeeding email that is sent. Obviously this is not optimum (Ha!)

Does anyone know anyway to get rid of the returned emails so they don't create problems?

Thanks for your help!
 
Why is the mail returned? Is it just a case of users entering bad emial addresses? If so you may want to consider having them enter the email twice or using an email confirmation routine that won't add them to the Send To list until the email address has been confirmed as a good one.
 
The emails are being returned because the email address is not valid.

Thanks for your suggestion. We do ask them to enter their emails twice on the web site. But my Client has several thousand existing emails.

I need to be able to handle this problem. Web users will sometimes enter bogus email addresses. They may also decide to switch ISP's and so this will always be an ongoing problem.
 
What problem are they creating?

Perhaps it is as simple as using the Rules Wizard in Outlook to move the returned emails to the trash ... ? Set the properties for the Deleted Folder to empty upon exiting Outlook?
 
That sounds like it would work. However I would really like to know what the bogus Email addresses are so we can flag them and not send them more emails.

Any thoughts?
 
My example here assumes it has been moved to the Deleted Items folder, but you can modify it to point where you need. (This is in Outlook)

Code:
Public Sub tester()
Dim Item As MailItem
    Open "C:\MyTest.txt" For Append As #1
    Set myOlApp = CreateObject("Outlook.Application")
    Set myNameSpace = myOlApp.GetNamespace("MAPI")
    Set myDelItems = myNameSpace.GetDefaultFolder(3)
    Set myfolder = myDelItems.Folders
    For Each Item In myfolder.Parent.Items
        Print #1, Item.SenderName
    Next
    Close
End Sub
You could then read in the text file to delete the emails from your db. Another thing you could do is have a Verify function that would send an email to the address given. It would only 'Activate' the email address if a reply came from that address. You would then only use 'Activated' email addresses.
 

Users who are viewing this thread

Back
Top Bottom