MatthewSot
MatthewSot

Reputation: 3594

Receive mail in ASP.NET, only using ASP.NET?

In my ASP.NET application, I need to be able to receive emails in real time, then copy the message data into a SQL database and alert the user. I've thought about using a free service like Outlook.com with IMAP IDLE, but that just seems like adding in a middleman that can't really be trusted (in terms of blocking me out if I receive too many emails too fast, for example). Is there any open source mail server for ASP.NET I can use, or what sort of thing should I use to receive the emails?

Thanks!

Upvotes: 1

Views: 418

Answers (1)

James
James

Reputation: 82096

You can't receive emails directly using ASP.NET as it's not a mail server, however, what you can do is poll a mail server and pull the email content into your ASP.NET application.

I have had success in the past using Lumisoft's IMAP Client for .NET which I used in a windows service whose sole purpose was to poll a Microsoft Exchange account and parse/push information from emails to an SQL DB at certain intervals.

I've thought about using a free service like Outlook.com with IMAP IDLE, but that just seems like adding in a middleman that can't really be trusted (in terms of blocking me out if I receive too many emails too fast, for example)

The only way you can be sure of whether or not that would become an issue is to read their usage policy. However, if you need complete control over the mail server you would need to host your own.

Upvotes: 2

Related Questions