NetTalk Central

Author Topic: Receiving Email and parsing it and putting in a database  (Read 4010 times)

springguy

  • Full Member
  • ***
  • Posts: 195
    • View Profile
    • Email
Receiving Email and parsing it and putting in a database
« on: August 24, 2012, 01:37:31 PM »
NT 6.3.5
I have an app that automatically sends emails to selected persons based on an analysis of an activity process.  That works great.  But, I just saw a demo of a sort of similar system in a different kind of market where the person receiving the email could reply and that email reply would end up in a database that would show up over their web server.

Hmmm.... interesting in my situation - if the person receiving the email from the NT server could reply to the email, and I could receive their reply and parse it to put into a database so other people could see the interaction and background processes could update other data based on the reply contents.

Does anyone have some thoughts about how to set up the web server so it could receive the emails and parse them and put them in a database?

Thanks,
Mike Springer

Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Receiving Email and parsing it and putting in a database
« Reply #1 on: August 24, 2012, 10:19:44 PM »
Hi Mike,

This is what I did in one of our apps - works very well

I created a new Window Procedure in my app.

I cheated by importing the EmailReceive window from the Nettalk demo which has all the bits already setup for receiving emails  ;)

When my Web app starts, I START this window on a thread of it's own.  I tweaked the window and created a Timer which POST's an Event:Accepted to the "RECEIVE" button periodically.

There are a number of embeds that make it very easy to check if mail is received and also to parse any received emails.  I use StringTheory to parse received emails and with this, one can pretty much do what u want.

You would naturally have to setup Email Server and incoming Email Address settings to taste

hth
Graham Smith

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11263
    • View Profile
Re: Receiving Email and parsing it and putting in a database
« Reply #2 on: August 24, 2012, 11:03:53 PM »
There are two broad approaches.

a) allow them to reply to the email, to a pre-determined mail box, then have a program that reads that mailbox and parses the informatio, placing it in your database.

or

b) include links in the email, which when clicked take the user to a specific page in your site where they can enter more information.

cheers
Bruce