0

I have an application where I need to check emails as they come, however using POP3 to poll an email server is a major pain.

Ideally I'd just like to setup an email server and write a plugin for it to handle some sort of EmailReceived event, that contains all the headers and content of the e-mails received.

I'm not looking to create an email server from scratch, however if there is a decent open source one written in .NET I can just modify to do this that would be just as good.

Preferably though I'd rather just write a plugin for a server that has an API for something like this.

Does anyone know of an email server that runs on Windows and supports plugins and has an API, or at the least, is open source in .NET to allow extending it myself?

4

1 回答 1

2

Polling with IMAP or POP3 isn't really that terrible, but it sort of depends on the volume of traffic that you are anticipating.

I can not suggest a system for .NET, but if you want to just right "plugins", you may want to consider using Apache James, which is essentially what you're asking for, but it is in Java.

Depending on the complexity of what you are looking to do, it may well be suitable to write some minor plugin code in Java that interfaces to your system (calls a web service, calls a stored procedure perhaps). Another thought is that you could use James, or some other technique to post the message to a Messaging queue. In Java this is JMS, I don't know the name of the system in .NET, but I'm sure there is some messaging solution available in the Microsoft stack, and I imagine that Java JMS can post to it.

Using that, the James plugin in can be just the thinnest shim necessary to get the mail out of SMTP and Java and in to .NET where you're more comfortable running.

于 2010-01-01T20:06:30.100 回答