Turn off SMTP on Windows 7

iis-7smtpwindows 7

I have a large asp.net web application I need to run locally. The application has a large amount of email services and I want to make sure I don't send any email accenditally as I don't know all the inner workings of the code yet. How can I turn off SMTP functions on Windows 7.

Best Answer

DONT DO IT. YOu can not. But you can redirect them to a drop directory - i.e. everytime you send an email, a file is generated in a directory. That actually makes also sense in production (local SMTP Service, using the same directory for pickup - emails are generated faster than a SMTP connection). Check the web.config - locally or globally - for how to configure how SMTP deals. THis is also in IIS configuration manager ;)

For a short term fix (with possible side effects) change the WIndows FIrewall to block outgoing connections to port 25 (SMTP). Carefull - that will also affect any email client running, obviously.