1
大附件,我一直在試圖發送使用C#ASP.NET 3.5 System.Net.Mail大附件(9 MB)。我讀過.NET 4.0有一個不允許的錯誤,但.NET 3.5沒有問題。 .NET 4.0 Fails When sending emails with attachments larger than 3MB發送使用C#ASP.NET 3.5 System.Net.Mail
因爲.NET 3.5不關閉會話郵件發送後正常,我加入這行之前,它發送:
smtpClient.ServicePoint.MaxIdleTime = 2;
線
smtpClient.Send(email);
仍拋此錯誤:
Exceeded storage allocation. The server response was: 5.3.4 Error: message file too big:
at System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse)
at System.Net.Mail.DataStopCommand.Send(SmtpConnection conn)
at System.Net.Mail.SmtpConnection.OnClose(Object sender, EventArgs args)
at System.Net.ClosableStream.Close()
at System.Net.Mail.MailWriter.Close()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
更改編碼克沒有幫助。這會破壞附件:
email.Attachments[0].TransferEncoding = System.Net.Mime.TransferEncoding.SevenBit;
有人能幫忙嗎?謝謝。
非常感謝你。 – engg 2012-02-16 18:30:51