Solved

Return emails in outlook

Posted on 2004-04-08
7
284 Views
Last Modified: 2010-05-02
I have a visual basic program that will parse emails.  What I need to do is take emals that are returned to us and parse out the email address that it was originally sent to and mark it in our database as a bad email address.  I started doing this but it seems that most of the return emails are in different formats.  Example  

subject: return failure
body: this is bad joe@hotmail.com

then the next one might be

subject: return failure
Body: the email could not be sent
joe@hotmail.com was a bad email address

I am just looking for an easy way of processing these returns and marking them in the database so we can remove them after so many returns.
0
Comment
Question by:Hook333
  • 2
  • 2
7 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 10785958
If you don't mind using CDO then the code sample in this Microsoft article will return the SMTP header for each message.  You can parse that header and find the name and email address the message was originally sent to.  I imagine that'll be a difficult process though since it's reasonable to anticipate that different email systems will generate different header formats.  I played around with this and looked at what was returned in a non-delivery report message.  The address of the original recipient is there, but I don't know what logic could be employed to make finding it either easy or a sure thing.

http://support.microsoft.com/?kbid=194870
0
 
LVL 76

Expert Comment

by:David Lee
ID: 10786264
This might be of interest too.

http://www.mapilab.com/dev/mapiprop/
0
 

Author Comment

by:Hook333
ID: 10786827
Thanks for trying but I have written a program just to go ahead and parse the emails as i need to look for key words like "quota" ect.  I will just have to look for a bunch of possibilities in my code.  I do not need an answer for this anymore!
0
 

Author Comment

by:Hook333
ID: 11440665
I answered this question myself.  Sorry it took me so long to reply I was on vacation.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11441384
PAQed, with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

864 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now