Hello all,
First off, if there is a better place to post for an answer to this
question, please feel free to point me there.
I have some very strange behavior happening with my System.web.mail objects.
I was able to run my application fine for roughly 1500 email messages. The
next time I tried sending mail, it stopped working with the message:
"
The message could not be sent to the SMTP server. The transport error code
was 0x80040217. The server response was not available
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: The message
could not be sent to the SMTP server. The transport error code was
0x80040217. The server response was not available
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[COMException (0x80040211): The message could not be sent to the SMTP
server. The transport error code was 0x80040217. The server response was not
available
]
[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[] modifiers,
CultureInfo culture, String[] namedParameters) +473
System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args) +58
[HttpException (0x80004005): Could not access 'CDO.Message' object.]
System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args) +113
System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1840
System.Web.Mail.SmtpMail.Send(MailMessage message) +150
Intranet.srcMail.sendMailNow(String listID) in c:\documents and
settings\sean\vswebcache\srcfileserver\intranet\sr cmail.cs:128
Intranet.srcCommon.fnSendMail(String strTo, String strSubject, String
strBody, String list_ID, String groupID, String Mailing) in c:\documents and
settings\sean\vswebcache\srcfileserver\intranet\sr ccommon.cs:257
Intranet.srcCommon.doMail(Boolean bTest, String strEmailAddress, String
txtBody, String txtSubject, String listID, String groupID, String Mailer) in
c:\documents and
settings\sean\vswebcache\srcfileserver\intranet\sr ccommon.cs:100
Intranet.TestMailToSignups.Button1_Click(Object sender, EventArgs e) in
c:\documents and
settings\sean\vswebcache\srcfileserver\intranet\te stmailtosignups.aspx.cs:12
3
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo
stBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
----------------------------------------------------------------------------
----
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573 "
My question is this: What would cause this behaviour? I have since changed
several lines of code to try to fix the problem, but have not had any
success. This has happened to me in the past and it seemed like rebooting
the server may have fixed it, not this time however.
Here's my code snippit:
public void sendMailNow(string listID)
{
MailMessage myMail = new MailMessage(); myMail.To = ToMail;
if(mBCC != "")
myMail.Bcc = mBCC;
myMail.From = FromMail;
myMail.Subject = mSubject;
myMail.BodyFormat = mFormat;
myMail.Body = mBody;
myMail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthentica
te"] = 1;
myMail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"]
= mUserName;
myMail.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"]
= mPassword;
SmtpMail.SmtpServer = mSMTPServer;
SmtpMail.Send(myMail);
logMailnow(ToMail,listID);
} 2 90558
Sorry, I hit send prior to finishiing up the message:
All variables listed in my code at the bottom are set through properties...
It just seems strange to me that it works then stops. I'm using this for
emails to people who have signed up for newsletters (and there's only a
handful). Basically, I'm trying to let the other folks in my office manage
their own communciations with our clients through a web interface.
Thanks in advance for your help.
"Janna Deegan" <sp******@earthlink.net> wrote in message
news:aY***************@newsread3.news.atl.earthlin k.net... Hello all,
First off, if there is a better place to post for an answer to this question, please feel free to point me there.
I have some very strange behavior happening with my System.web.mail
objects. I was able to run my application fine for roughly 1500 email messages.
The next time I tried sending mail, it stopped working with the message: " The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: The
message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[COMException (0x80040211): The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was
not available ]
[TargetInvocationException: Exception has been thrown by the target of an
invocation.] System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0 System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[]
modifiers, CultureInfo culture, String[] namedParameters) +473 System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String methodName, Object[] args) +58
[HttpException (0x80004005): Could not access 'CDO.Message' object.] System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String methodName, Object[] args) +113 System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1840 System.Web.Mail.SmtpMail.Send(MailMessage message) +150 Intranet.srcMail.sendMailNow(String listID) in c:\documents and settings\sean\vswebcache\srcfileserver\intranet\sr cmail.cs:128 Intranet.srcCommon.fnSendMail(String strTo, String strSubject, String strBody, String list_ID, String groupID, String Mailing) in c:\documents
and settings\sean\vswebcache\srcfileserver\intranet\sr ccommon.cs:257 Intranet.srcCommon.doMail(Boolean bTest, String strEmailAddress, String txtBody, String txtSubject, String listID, String groupID, String Mailer)
in c:\documents and settings\sean\vswebcache\srcfileserver\intranet\sr ccommon.cs:100 Intranet.TestMailToSignups.Button1_Click(Object sender, EventArgs e) in c:\documents and
settings\sean\vswebcache\srcfileserver\intranet\te stmailtosignups.aspx.cs:12 3 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo stBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33 System.Web.UI.Page.ProcessRequestMain() +1277
--------------------------------------------------------------------------
-- ----
Version Information: Microsoft .NET Framework Version:1.1.4322.573;
ASP.NET Version:1.1.4322.573 "
My question is this: What would cause this behaviour? I have since
changed several lines of code to try to fix the problem, but have not had any success. This has happened to me in the past and it seemed like rebooting the server may have fixed it, not this time however.
Here's my code snippit:
public void sendMailNow(string listID)
{
MailMessage myMail = new MailMessage(); myMail.To = ToMail;
if(mBCC != "")
myMail.Bcc = mBCC;
myMail.From = FromMail;
myMail.Subject = mSubject;
myMail.BodyFormat = mFormat;
myMail.Body = mBody;
myMail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthentica te"] = 1;
myMail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = mUserName;
myMail.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = mPassword;
SmtpMail.SmtpServer = mSMTPServer;
SmtpMail.Send(myMail);
logMailnow(ToMail,listID);
}
replies probably a bit late :-) - but for those other visitors to th
site with this error:
It's caused by a wrong username or password for the SMTP server an
usually means that the server has disabled your account for spamming i
you've sent 1500 mails
--
Wierdy1024Posted from http://www.pcreview.co.uk/ newsgroup acces This discussion thread is closed Replies have been disabled for this discussion. Similar topics
2 posts
views
Thread by Lauren Wilson |
last post: by
|
reply
views
Thread by Yan |
last post: by
|
3 posts
views
Thread by Hamilton |
last post: by
|
4 posts
views
Thread by cs_hart |
last post: by
|
reply
views
Thread by Ram |
last post: by
| | | | | | | | | | | | | | |