Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / C#

Create a simple SMTP server in C#

0.00/5 (No votes)
21 Nov 2011CPOL 9.2K  
Please note I don't want to take anything away from roosrj's tip which displays infinitely more in depth knowledge about the SMTP protocol than I can - as a lazy man's alternative I've always used PostCast v2.6 to test anything mail related:...

Please note I don't want to take anything away from roosrj's tip which displays infinitely more in depth knowledge about the SMTP protocol than I can - as a lazy man's alternative I've always used PostCast v2.6 to test anything mail related: http://www.postcastserver.com/download/release.aspx?p=3[^].


I just set it up to listen on a port and don't bother with forwarding the mail on. This way I can use it to not only test my mail sending code, but I also get to see the contents of the mail (useful for inspecting HTML mails), switch between HTML and RTF, and so on - as if I'd sent the mail to my Outlook.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)