SmtpMail导致应用程序挂起...

编程入门 行业动态 更新时间:2024-10-09 12:31:35
本文介绍了SmtpMail导致应用程序挂起...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好: 使用Imports System.Web.Mail我的模块头部的子句,以及执行以下代码后的: Dim msg As New MailMessage msg。 From = sender msg.To =收件人 msg.Attachments.Add(New MailAttachment(attachFile)) msg.Subject = subjectString SmtpMail.SmtpServer = mailservername SmtpMail.Send(msg) 邮件发送得很好,但我的申请拒绝了 终止......当子主要结束时,它只是挂起,瞥一眼我的任务 经理表明它正在使用不断增加的内存量,以及我的 CPU使用率高达100%,我实际上必须杀死 申请才能终止。直到我安装上面的代码之后才开始发生这种情况...... 无论我是否明确销毁MailMessage,我都会看到相同的行为 对象与否,我是否重置邮件服务器名称... 任何帮助将不胜感激! 干杯, zdrakec

解决方案

我不知道asnwer,但大多数都与System.Web有关。邮件位于: systemwebmail/ - Carlos J. Quintero MZ-Tools 4.0:生产力添加 - 用于Visual Studio .NET的ins 您可以更快地编码,设计和记录。 www.mztools < zd ***** @ yahoo> escribióenel mensaje news:11 ********************** @ c13g2000cwb.googlegr oups ...

大家好: 使用Imports System.Web.Mail我的模块头部的子句,以及执行以下代码后: Dim msg As New MailMessage msg.From = sender msg.To =收件人 msg.Attachments.Add(New MailAttachment(attachFile)) msg.Subject = subjectString SmtpMail.SmtpServer = mailservername SmtpMail.Send(msg) 经理显示它正在使用 - 内存量越来越大,而且我的CPU使用率高达100%,我实际上必须杀死应用程序才能终止它。直到我安装上面的代码后才开始发生这种情况...... 我是否明确销毁了MailMessage 对象,无论是否重置邮件服务器名称与否... 任何帮助将不胜感激! 干杯, zdrakec

感谢您的链接,但不幸的是,我没有看到任何 在那里解决这个问题... zdrakec Carlos J. Quintero [.NET MVP]写道:

我不知道asnwer,但大多数都与System.Web.Mail 相关at: systemwebmail/

Zdrakec, 您现在在这个新闻组中显示的这个片段经常在这里。 主要是smtp邮件服务器不正确的错误。那不是你的情况。 你的情况。因此在我看来它与无限循环有关 某处但不在此片段中。 只是我的想法, Cor

Hello all: Using an "Imports System.Web.Mail" clause at the head of my module, and after executing the following code: Dim msg As New MailMessage msg.From = sender msg.To = recipient msg.Attachments.Add(New MailAttachment(attachFile)) msg.Subject = subjectString SmtpMail.SmtpServer = mailservername SmtpMail.Send(msg) The message is sent just fine, but then my application refuses to terminate... when sub Main ends, it just hangs, and a glance at my task manager shows it to be using ever-increasing amounts of memory, and my CPU usage shoots up to 100%, and I actually have to kill the application for it to terminate. This did not start happening until AFTER I installed the code above... I see the same behavior whether I explicitly destroy the MailMessage object or not, whether I reset the mail server name or not... Any help will be greatly appreciated! Cheers, zdrakec

解决方案

I don′t know the asnwer, but most of them related to System.Web.Mail are at: systemwebmail/ -- Carlos J. Quintero MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET You can code, design and document much faster. www.mztools <zd*****@yahoo> escribió en el mensaje news:11**********************@c13g2000cwb.googlegr oups...

Hello all: Using an "Imports System.Web.Mail" clause at the head of my module, and after executing the following code: Dim msg As New MailMessage msg.From = sender msg.To = recipient msg.Attachments.Add(New MailAttachment(attachFile)) msg.Subject = subjectString SmtpMail.SmtpServer = mailservername SmtpMail.Send(msg) The message is sent just fine, but then my application refuses to terminate... when sub Main ends, it just hangs, and a glance at my task manager shows it to be using ever-increasing amounts of memory, and my CPU usage shoots up to 100%, and I actually have to kill the application for it to terminate. This did not start happening until AFTER I installed the code above... I see the same behavior whether I explicitly destroy the MailMessage object or not, whether I reset the mail server name or not... Any help will be greatly appreciated! Cheers, zdrakec

Thanks for the link, but unfortunately, I did not see anything that addresses this issue there... zdrakec Carlos J. Quintero [.NET MVP] wrote:

I don′t know the asnwer, but most of them related to System.Web.Mail are at: systemwebmail/

Zdrakec, This snippet you show now in this newsgroup has been here often. Mostly is the error that the smtp mailserver is not correct. That is not in your situation. Therefore in my opinion has it to do with an endless loop somewhere however not in this snippet. Just my thought, Cor

更多推荐

SmtpMail导致应用程序挂起...

本文发布于:2023-11-03 05:08:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1554313.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   挂起   SmtpMail

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!