I have to test some C# code which sends simple HTML content with Attachment through SMTP server. How can I make sure my code works. My machine is Vista and have IIS-7, I don't want to connect to any external SMTP
4 Answers
Please see:
How can I save an email instead of sending when using SmtpClient?

- 1
- 1

- 295,962
- 43
- 465
- 541
-
Would the downvoter (to a very old, accepted answer) please leave a comment. Thanks. – Mitch Wheat Mar 27 '11 at 13:06
How about using a "Fake"SMTP Server like http://ndumbster.sourceforge.net/default.html

- 346
- 4
- 9
If you want to test by actually sending email, you can install a free SMTP server on Vista. If you don't want the message to go anywhere, you could consider implementing at least part of SMTP in a diagnostic program. I did this recently - it's not all that hard if you just want to capture the messages and aren't trying to write a real server.

- 51,025
- 31
- 133
- 161
I normally test with an installation of Apache James, which has a full featured smtp & pop3 server, it is a java server so you only need the JRE installed. I install it in the same machine I'm debugging, I'd recommend though that you have to follow some of the tutorials on its wiki to install it correctly, it installation is not really that intuitive.

- 2,995
- 29
- 45