//deliver the email to the recipient in eml format
Response.ClearHeaders();
Response.Clear();
Response.Buffer = true;
Response.ContentType = "message/rfc822";
Response.AddHeader("content-length", bin.Length.ToString());
Response.AddHeader("content-disposition", "attachment; filename=\"email.eml\"");
Response.OutputStream.Write(bin, 0, bin.Length);
Response.Flush();
HttpContext.Current.ApplicationInstance.CompleteRequest();
//The JavaScript function call does not execute.
ClientScript.RegisterStartupScript(GetType(), Guid.NewGuid().ToString(), "closeLoading();", true);
Removing the code that sends users a .eml file allows everything to work smoothly. I am attempting to close a loading dialog after completing a process. This application, built with web forms in C#, is of an older version.
I trigger the Loading popup using a basic JavaScript command "loading.show();"
It appears that the ContentType may be causing issues. Any suggestions?
Appreciate any help.