How to disable NLog from sending emails when running MVC3 app on localhost
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?
Re: How to disable NLog from sending emails when running MVC3 app on localhost
Your answer wasn't really the answer I was looking for, but it got me in the right direction!
I read the "ServiceAdress" value from web.config and in Application_Error-method where I log the error, and just added to the if -case "if the value from the ServiceAdress != "localhost" then do Log (after using Substring on it).