tags:

views:

49

answers:

2

I'm interested in writing a SMTP mail server that just sends emails? I would be writing this in C# as a stand alone application. So if anyone can point me in the right direction or explain how an SMTP actualy sends out emails that would be great.

+2  A: 

Read up on RFC821 and and RFC1870. Your best bet as an introduction would be to look at examples of SMTP traffic. Download Wireshark or use any other packet capture software, send some e-mails over SMTP, and study what was captured. SMTP is a text-based protocol and fairly straight forward.

Please obey the RFCs with your application. There are so many broken SMTP and other mail-related applications out there that make things difficult. You might be better off just using the SmtpClient Class built into .NET. At least, that's what I would use. No sense in re-inventing the wheel, yes?

Brad
Thanks for some good ideas and yes it would be re-inventing the wheel but it would definatly be interesting as it seems email isn't something that seems to be clearly defined for a Simple Mail Transfer Protocol.
Lavinski
+1  A: 

In this open source project, there is everything you need including a windows services that does exactly what you describe:

http://mailsystem.codeplex.com

Pierre 303
Why does everyone like to start from scratch? Just take what already exists.
Oliver