Click here to Skip to main content
15,881,248 members
Articles / Programming Languages / C#
Alternative
Tip/Trick

Create a simple SMTP server in C#

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
21 Nov 2011CPOL 9K   5  
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)


Written By
Software Developer (Senior)
United Kingdom United Kingdom
First batch file in 1987

Messed around with the Bullfrog C++ Libraries for Syndicate in 1994

Web Developer since 2000

.net Developer since 2001

MCTS: Microsoft® .NET Framework 2.0 - Web-based Client Development

MCTS: Web Applications Development with Microsoft .NET Framework 4

Comments and Discussions

 
-- There are no messages in this forum --