Solved

Return emails in outlook

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

840 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