Does anyone know how to disable the NLog application from sending out emails when running tests on the MVC3 application on localhost? I would like NLog to only send out emails when the application gets en error when deployed to the webserver. What would I have to write in order to accomplish that?
Thanks
You could try “disabling” the mail sending by changing the mail settings:
This will drop off the e-mails in a folder on your computer. This doesn’t really stop the mails, but it stops them from being sent.
Also making it a lot easier to verify that e-mails are being “sent”, if you’re running manual or automated tests.