Posted on: 2/17/2015 3:35:42 PM | Views : 584

So we have a few forms on our intranet site that send confirmation emails upon successful submissions. So on the form the email I sent to the submitter(confirmation) and the same email is sent to management (notification) for review of the submission.
When you submit the form, we had to add a "Processing" message box so that the user knows that the page is working and not to close it. But we finally pin pointed the delay in the sending of the email method that is called.
Here is what we have setup throughout the site, is there something obvious that we are doing wrong to cause the slowness.
 
private void MailNotification(int typeid, string requestor = null, string mailChanges = null) { StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); HtmlTextWriter hw = new HtmlTextWriter(sw); DisableAJAXExt ...

Go to the complete details ...