asp.net net.mail - route all emails to a different email address in debug mode
Is there anyway to have all emails go to a different address when System.Web.HttpContext.Current.IsDebuggingEnabled is true? Or do I need a new class which I use to send email everywhere? We use a similar solution to the MailProxy method detailed by tvanfosson. However we have a few differences that I feel are worth mentioning. The first is that we simply extend the SmtpClient class and override the Send methods when in a development or testing environment. We use a config file to determine the environment. We then use this class anytime we need to send out emails. This class will determine