大家好: 使用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, zdrakecThanks 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导致应用程序挂起...
发布评论