Note that there are some explanatory texts on larger screens.

plurals
  1. POI can send the images and rar files but that files was corrupted using asp.net?
    text
    copied!<p>i am using asp.net and c#.net to send the mail with large attachments(max 10mb), that the reason i can convert the files, .txt,.doc,.xls file are perfectly sending but images and rar file corrupted what is the problem please give me any suggestion , <strong>My code is</strong></p> <pre><code> DataSet ds = SqlHelper.ExecuteDataset(con, "usp_GetEmailSettings", Session["UserID"].ToString()); message.To.Add(ds.Tables[0].Rows[0]["Email"].ToString()); message.CC.Add(ds.Tables[1].Rows[0]["EmailID"].ToString()); message.Subject = ds.Tables[0].Rows[0]["Email_Subject"].ToString(); message.From = new System.Net.Mail.MailAddress(ds.Tables[1].Rows[0]["EmailID"].ToString()); message.Body = ds.Tables[0].Rows[0]["Email_Body"].ToString() + "&lt;br/&gt;&lt;br/&gt; &lt;font size='2.0em'&gt;Submission Number : " +filename+"&lt;br/&gt; DBA Name : " +txtDBAName.Text + "&lt;br/&gt; Insured Name : " +TxtInsured.Text + "&lt;br/&gt; Additional Comments : " + txtcomment.Value ; message.IsBodyHtml = true; string attachId; System.Net.Mail.Attachment at; // Get the HttpFileCollection and Attach the Multiple files HttpFileCollection hfc = Request.Files; if (hfc.Count &gt; 0) { for (int i = 0; i &lt; hfc.Count; i++) { HttpPostedFile hpf = hfc[i]; if (hpf.ContentLength &gt; 0) { if (i == 0) { string[] ext = System.IO.Path.GetFileName(hpf.FileName).Split('.'); attachId = filename + "." + ext[1]; at = new System.Net.Mail.Attachment(fluuploader.FileContent, attachId); } else { string[] ext = System.IO.Path.GetFileName(hpf.FileName).Split('.'); attachId = filename + "(" + i + ")" + "." + ext[1]; at = new System.Net.Mail.Attachment(fluuploader.FileContent, attachId); } at.TransferEncoding = System.Net.Mime.TransferEncoding.SevenBit; // at.TransferEncoding = System.Net.Mime.TransferEncoding.QuotedPrintable; message.Attachments.Add(at); } } } smtp.Timeout = 9999999; smtp.Send(message); </code></pre> <p>web.config my code is</p> <pre><code>&lt;httpRuntime executionTimeout="240" maxRequestLength="20480"/&gt; </code></pre> <p><strong>at.TransferEncoding = System.Net.Mime.TransferEncoding.SevenBit;</strong> i can give the comment in that line doesnot send the large files but all are perfectly working but i have send the large files maximum 10mb , pls give me suggestion</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload