i want generate eml file using binary data which involved my email data and also I have add MIMEType is application/vnd.ms-outlook and enxtension is .eml
filename = Regex.Replace(filename, @"[,~#'%&*:<>?/\{|}\n]", "");
Attachments objAttachment = new Attachments();
MemoryStream stream = (new Attachments()).GetAttachment(iAttachmentID);
/*Amar test this*/
//string Updateddata =HttpContext.Current.Session["FirstName"].ToString();
//byte[] byteArray = Encoding.ASCII.GetBytes(Updateddata);
/*amar this*/
byte[] byteArray = stream.ToArray();
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + filename);
Response.Buffer = true;
Response.ContentType = "application/vnd.ms-outlook";
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.BinaryWrite(byteArray);
Response.End();