Solved

Return emails in outlook

Posted on 2004-04-08
7
285 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

813 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

19 Experts available now in Live!

Get 1:1 Help Now