views:

439

answers:

2

What are some strategies for programatically setting up an email interface between a pop3 mailbox and an sql server database ?

I'd like to be able to setup an account, say "[email protected]", and any email sent to that email address I'd like to senders email address, the subject and the body of the message inserted into a table (for simplicity let say the table is called 'email' and has just those three columns).

What are some of the available options to accomplish this?

+1  A: 

You could use a .NET component like:

http://www.rebex.net/mail.net/

Then have a scheduled task kick off a process that checks the inbox every X minutes, reads the new e-mails, then writes them to the DB.

JerSchneid
A: 

I recommend writing a windows service that polls an email box periodically. I found this example for reading POP3 email:

http://anuraj.wordpress.com/2009/03/02/reading-pop3-mailbox-using-vbnet/

and also this one:

http://www.developerfusion.com/article/4071/how-to-pop3-in-c/2/

hypoxide