How to build an SMTP server?

Am I interested in writing an SMTP mail server that just sends letters? I would write this in C # as a standalone application. So if anyone can point me in the right direction or explain how SMTP actually sends emails that would be great.

+5
source share
2 answers

Read RFC821 and RFC1870 . The best choice for implementation would be to look at examples of SMTP traffic. Download Wireshark or use any other packet capture software, send emails via SMTP and see what was captured. SMTP is a text protocol and fairly straight forward.

Please obey the RFC with your application. There are so many broken SMTP and other email applications that make work difficult. You might be better off using the SmtpClient class built into .NET . At least this is what I will use. It makes no sense to reinvent the wheel, right?

+4
source
+2

All Articles