The following code assumes there is an appSetting name "ErrorRecipients" in the config file. It should be a ; delimited list of email addresses. If the appSetting is empty, then error emails will not get sent. It also assumes an appSetting named "MailServer", which contains, well, you know. In Global.asax file... protected void Application_Error(object sender, EventArgs e) { if (ConfigurationManager.AppSettings["ErrorRecipients"] != string.Empty) { //get reference to the source of the exception chain Exception ex = Server.GetLastError(); Exception baseEx = ex.GetBaseException(); // get a description of the error string errorDescription = System.DateTime.Now.ToString() + "\n" + User.Identity.Name + "\n" + Request.Browser.Browser + " " + Request.Browser.Version + "\n" + Request.Url.ToString() + "\n\n" + baseEx.GetType().ToString() + ":\n" + baseEx.GetBaseException().Message + "\n\nStack Trace:"; while (ex != null) { if (ex.GetType() != typeof(System.Web.HttpUnhandledException)) { errorDescription += "\n\n[" + ex.GetType().ToString() + ": " + ex.Message + ".]\n" + ex.StackTrace; } ex = ex.InnerException; } // mail the error description to the error recipients System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage(); msg.Subject = baseEx.GetType().ToString() + " in YOUR_APP_NMAE_HERE on " + this.Server.MachineName; msg.From = new System.Net.Mail.MailAddress("your_app@yourdomain.com"); foreach (string address in ConfigurationManager.AppSettings["ErrorRecipients"].Split(";".ToCharArray())) { msg.To.Add(address); } msg.Body = errorDescription; System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(ConfigurationManager.AppSettings["MailServer"]); smtp.Send(msg); } }