SMTP and IMAP server library for .NET
Asked Answered
H

6

19

Does anyone know a good SMTP/IMAP server library for C#?

I only found some long abandoned projects.


Only SERVER SIDE libraries, please no more posts about client libs.

Thanks, Fionn

Hygrometry answered 30/10, 2008 at 1:49 Comment(1)
Do you need the library to be able to do special tasks, like Queue mail for mass mailings?Liquefacient
B
4

I am working on a project where I need to receive a mail via SMTP on the local network (a legacy application is sending a mail for integration purposes). Originally, I was going to use the SMTP server in IIS and use event sinks but that seems a little heavy-handed. I am currently evaluating the following 3 candidate libraries:

nDumbster: Open source but not a fully-implemented server. Originally used for unit tests. It parses the mail to an object for easy inspection. I had to revise it to raise an event when a message was received.

SmtpServer: Modern design using .NET TPL and Implements STARTTLS. Source code does not seem readily available. Provides a few hooks when message is received but appears to hand you the message contents as a blob. (I didn't get to test this as it requires .net 4.5)

Rnwood.SmtpServer: Looks to be full-featured and source code is available although documentation is lacking.

Beilul answered 16/2, 2015 at 20:9 Comment(0)
C
14

LumiSoft.Net, a library from the LumiSoft mail server, is a free server side library. The server classes (e.g. IMAP Server, POP3 Server and SMTP Server) fire events when they need information or action for your server application, for example "give me a list of messages in virtual folder XXY".

Download Page

Carrillo answered 30/10, 2008 at 10:49 Comment(2)
Still looking for something open source but until something better appears I'll try this.Hygrometry
@Hygrometry It appears that the LumiSoft source code is here: github.com/pruiz/LumiSoft.Net There also seems to be a port to .NET Core here: github.com/ststeiger/Lumisoft.Net.CoreDandle
B
4

I am working on a project where I need to receive a mail via SMTP on the local network (a legacy application is sending a mail for integration purposes). Originally, I was going to use the SMTP server in IIS and use event sinks but that seems a little heavy-handed. I am currently evaluating the following 3 candidate libraries:

nDumbster: Open source but not a fully-implemented server. Originally used for unit tests. It parses the mail to an object for easy inspection. I had to revise it to raise an event when a message was received.

SmtpServer: Modern design using .NET TPL and Implements STARTTLS. Source code does not seem readily available. Provides a few hooks when message is received but appears to hand you the message contents as a blob. (I didn't get to test this as it requires .net 4.5)

Rnwood.SmtpServer: Looks to be full-featured and source code is available although documentation is lacking.

Beilul answered 16/2, 2015 at 20:9 Comment(0)
V
1

I've used DotNetOpenMail in the past.

Vitality answered 30/10, 2008 at 1:53 Comment(1)
Same here, i am talking about server stuff.Hygrometry
T
1

You didn't mention whether you are looking for free or paid/commercial. I have used IPWorks from nsoftware with great success in the past.

Teredo answered 30/10, 2008 at 10:42 Comment(0)
G
0

Also found https://github.com/cosullivan/SmtpServer, which seems to be a modern implementation of an SMTP (though no IMAP support):

SmtpServer is a simple, but highly functional SMTP server implementation. Written entirely in C# it takes full advantage of the .NET TPL to achieve maximum performance.

https://github.com/cosullivan/SmtpServer?tab=readme-ov-file

Gomar answered 29/2 at 18:44 Comment(1)
Oh this seems to be the same as "SmtpServer" mentioned in the currently accepted answer sorry.Gomar
T
-1

For SMTP, there's System.Net.Mail. For IMAP, I don't know. But once you fetch the email from the server, you'll want to parse it. The MIME parsing is the hard part. For that, I use, and recommend, SharpMimeTools.

Toadflax answered 30/10, 2008 at 1:51 Comment(4)
I am asking for server libraries, client is not the problem.Hygrometry
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post.Vena
@Vena There was a time way back when StackOverflow didn't have comments - this may be from then.Bench
@Bench it seems comments were existing when the question was asked on Oct 30 '08 (almost there is one). Then perhaps this answer is obsolete as question precise now it concerns server side library.Vena

© 2022 - 2024 — McMap. All rights reserved.