Maybe I am in the right forum for this question...
lets see.
If I were to put an email into a database from a mailing list, is it possible to pull that email from the database and do somthing with the information in the email like pluck it and place items into a different datatable?Do you mean in a query? If so yes, something like
insert into differenttable(name)
values(select substring(email, 1,patindex("@.", email)) from firsttable)
That's a little rough, but you could use substring and patindex if you want to do this through a query.|||Actually what I am trying to do is read the body of the email message. I want to find a way to put the entire email itself (.eml) into the database or to read it from a folder on the server.
The emails from OE go to a .dbx file.
I did find this information on that:
http://oedbx.aroh.de/
This contians ideas on how to crack the .dbx file to get to the emails inside.
Or i thought if I could export the .dbx file to sql database I could then get to the message from there - but even if it exports somehow, how would I get the email broken up after that to read the body of it.
I was looking at the FileSystemWatcher to see if I could look at the folders actions too.
this way i can figure when the files (emails) were entered into the folder and perform actions in code to grab that file and break it up to insert specific parts of it into a database.
Does anyone have any input or ideas on how any of this can be accomplished.
Thank-you|||This may not be what you are looking for, but how about using MAPI with .net to open outlook and parse through the messages? I haven't done much with that, so not sure how robust that would be, but might be an easy way to parse message body froms and tos. Just a thought.|||I forgot - I also found out that if you change the file extension of the .dbx file to .mht , you can open the file in notepad with the messages contained in it.
From there I can pluck the text document someway.
The only problem with that is once you remane the file extension to .mht, no other emails will go into it
So here is a plan:
monitor the folder
when new changes have been made to the folder (new mails added to the Inbox.dbx file), rename the extension
open the file and pull out the necessary information and insert it into a database table.
Now to put that together.
Am I reaching too far here?
No comments:
Post a Comment