[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Email to Database

Posted on 2012-09-17
12
Medium Priority
?
239 Views
Last Modified: 2012-11-09
I have a MS-Exchange emai account that gets email alerts for status changes to projects we are working on.

I want to take these alerts and put them into a DB so I can report the status via a web site.

I am not really sure where to start but I thought the first thing to do is parse the email into a Database, I have MS SQL 2008.

Here is an example of the email body.

Location: MyStore #7536
Requested Service: Time Clock Install
PO#: Per Rick
WO#: 23981
Scheduled ETA: 9/12/2012 4:00:00 PM
Check in: 9/12/2012 2:00:00 PM
Check out: 9/12/2012 4:00:00 PM
Progress - Resolution Notes:
Technician reports site is completed. Technician installed 2 new time clocks and worked with Sherry from support. Technician confirmed with Sherry that both are working with no issues. Technician took pictures and will be sending them over shortly.


There are several alerts that I get, and the subject line will say which kind it is, arrival alert, departure alert ect....
0
Comment
Question by:Wildone63
  • 5
  • 3
  • 2
10 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38407116
Do you use Outlook? You can write an Outlook addin which can parse emails as the email arrives.
0
 
LVL 1

Author Comment

by:Wildone63
ID: 38407239
Yes I can use outlook, Do you have an example of this?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38408599
Example of handling new mail arrival

http://msdn.microsoft.com/en-us/library/ms268998(v=vs.80).aspx

You can then add logic within this event handler or may be start an external program and supply it email body text or probably save email body as a text file to a folder monitored by your program which then picks up the text file and parses it.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:Wildone63
ID: 38409908
I took a look at this and am having a very difficult time with it.

The problem with Most of microsofts examples from MSDN is they leave off too much information for example, what name spaces should I include, and what com objects do I need to reference to make their example functional?

Can you give me any more guidance?

Thank You!!!
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38410603
0
 
LVL 1

Author Comment

by:Wildone63
ID: 38410985
Thank You... But this link is showing how to write a mail message. I want to Read the mail message and write it into SQL.
0
 
LVL 39

Expert Comment

by:Aaron Tomosky
ID: 38563877
Here is a completely different approach:
What language is your website written in? All major languages have libraries for connecting via pop and getting messages...
0
 
LVL 1

Author Comment

by:Wildone63
ID: 38577313
I am using Visual Studio with VB.net C#.net and some javascript.
0
 
LVL 39

Accepted Solution

by:
Aaron Tomosky earned 2000 total points
ID: 38578235
get the mail:
http://sourceforge.net/projects/hpop/

connecting to a db in c# is something that shouldn't be hard at all if you are attempting this.



you could also just use something like spiceworks but that may be overkill.
0
 
LVL 1

Author Comment

by:Wildone63
ID: 38585238
Thank You!
0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

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

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video discusses moving either the default database or any database to a new volume.
Suggested Courses
Course of the Month20 days, 10 hours left to enroll

867 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