1. <legend id='RAcZP'><style id='RAcZP'><dir id='RAcZP'><q id='RAcZP'></q></dir></style></legend>

    <small id='RAcZP'></small><noframes id='RAcZP'>

      <i id='RAcZP'><tr id='RAcZP'><dt id='RAcZP'><q id='RAcZP'><span id='RAcZP'><b id='RAcZP'><form id='RAcZP'><ins id='RAcZP'></ins><ul id='RAcZP'></ul><sub id='RAcZP'></sub></form><legend id='RAcZP'></legend><bdo id='RAcZP'><pre id='RAcZP'><center id='RAcZP'></center></pre></bdo></b><th id='RAcZP'></th></span></q></dt></tr></i><div id='RAcZP'><tfoot id='RAcZP'></tfoot><dl id='RAcZP'><fieldset id='RAcZP'></fieldset></dl></div>
      • <bdo id='RAcZP'></bdo><ul id='RAcZP'></ul>
      <tfoot id='RAcZP'></tfoot>

      邮件发送失败.无法将数据写入传输连接

      时间:2023-10-05
      <legend id='uUrei'><style id='uUrei'><dir id='uUrei'><q id='uUrei'></q></dir></style></legend>

      <i id='uUrei'><tr id='uUrei'><dt id='uUrei'><q id='uUrei'><span id='uUrei'><b id='uUrei'><form id='uUrei'><ins id='uUrei'></ins><ul id='uUrei'></ul><sub id='uUrei'></sub></form><legend id='uUrei'></legend><bdo id='uUrei'><pre id='uUrei'><center id='uUrei'></center></pre></bdo></b><th id='uUrei'></th></span></q></dt></tr></i><div id='uUrei'><tfoot id='uUrei'></tfoot><dl id='uUrei'><fieldset id='uUrei'></fieldset></dl></div>
      1. <tfoot id='uUrei'></tfoot>

        <small id='uUrei'></small><noframes id='uUrei'>

          <tbody id='uUrei'></tbody>
              • <bdo id='uUrei'></bdo><ul id='uUrei'></ul>
                本文介绍了邮件发送失败.无法将数据写入传输连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在使用 Gmail SMTP 服务器从 VB.Net 发送邮件.尽管它可以正常发送一些电子邮件,但对于其他一些电子邮件,它会返回以下错误:

                I am using a Gmail SMTP server to send mail from VB.Net. Although it sends some emails fine, for some others it returns the following error:

                发送邮件失败.无法将数据写入传输连接 System.Net.Sockets.SocketException:已建立的连接被主机中的软件中止

                Failure sending mail. Unable to write data to the transport connection System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine

                推荐答案

                我最近遇到了同样的问题,SmtpClient.SendMail(MailMessage) 被重复用于带有 350k 附件的电子邮件.每隔 33 条消息,就会出现您给出的错误.

                I was experiencing this same issue recently with SmtpClient.SendMail(MailMessage) being used repeatedly with an email with a 350k attachment. Every 33rd message, the error you gave would occur.

                原来我们封装了 SendMail 功能的共享组件在消息发送完成时没有在 SmtpClient 类上调用 Dispose().

                Turns out our shared component which encapsulated the SendMail functionality was not calling Dispose() on the SmtpClient class when the message was finished sending.

                client.Dispose() 添加到 SmtpClient 实例立即解决了问题,现在消息发出没有问题 - 数百条(是的,它们是给我们客户的合法产品通知,而不是垃圾邮件);)

                Adding client.Dispose() to the SmtpClient instance cleared the problem right up and now messages go out no problem - hundreds of them (and yes they're legitimate product notifications to our customers, not spam) ;)

                这篇关于邮件发送失败.无法将数据写入传输连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:asp.net 邮件添加回复 下一篇:Log4net html 格式化的 SmtpAppender

                相关文章

                <i id='potCE'><tr id='potCE'><dt id='potCE'><q id='potCE'><span id='potCE'><b id='potCE'><form id='potCE'><ins id='potCE'></ins><ul id='potCE'></ul><sub id='potCE'></sub></form><legend id='potCE'></legend><bdo id='potCE'><pre id='potCE'><center id='potCE'></center></pre></bdo></b><th id='potCE'></th></span></q></dt></tr></i><div id='potCE'><tfoot id='potCE'></tfoot><dl id='potCE'><fieldset id='potCE'></fieldset></dl></div>

                • <bdo id='potCE'></bdo><ul id='potCE'></ul>

                <small id='potCE'></small><noframes id='potCE'>

              • <legend id='potCE'><style id='potCE'><dir id='potCE'><q id='potCE'></q></dir></style></legend>

                <tfoot id='potCE'></tfoot>