Messaging system for c#
I am trying to find a solution that can handle messaging via email. When a user creates a message in my application, an email is sent using subject #4857474. Then, the email recipient can reply, without changing the subject, and my application would k开发者_如何转开发now what message it used, based on the #id in the subject.
Now, I do not want to implement such service because its rather complex. What I am looking for is a service that provides this, and just calls my web services for a request when a new message has arrived.
Is there such thing? Thanks!
In the smtp standard there are two header fields that can be used for this: message-id
and in-reply-to
.
Assign a unique message id when you send the mail, then inspect the in-reply-to field in messages you receive. Since the field is hidden from user input, there is no risk that the user messes with it.
I don't think there is a default component you could use. Also it wouldn't be a very complex flow i think.
Just read out the subject and trigger your app?
Is email a must or can you also use a webbased reply form? Then you could use just a database.
Edit:
Read email from C# http://www.codeproject.com/KB/IP/despop3client.aspx
Create a thread that runs for ever and reads out the mailbox. If a email matches your criteria (subject) then trigger your webservice.
精彩评论