Commerce Server General - Sending mail with CDOSYS on Windows 2003

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > February 2004 > Sending mail with CDOSYS on Windows 2003





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Sending mail with CDOSYS on Windows 2003
Zoe Hart

2004-02-07, 9:37 am

Our Commerce site code (CS2002, VS.NET 2003, C#) uses CDOSYS under
System.Web.Mail to send various mail messages. In the past, in order to
allow SMTP settings in IIS to control what server actually sends the email,
we've simply not set the SmtpMail.Server property. So our code basically
sets up a MailMessage objects and then calls SmtpMail.Send to send it.

That code runs fine on Windows 2000. We've not deployed our site to Windows
2003 and the SmtpMail.Send statement throws an exception:

[COMException (0x80040220): The "SendUsing" configuration value is
invalid. ]

[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(Object obj, String
methodName, Object[] args) +58

[HttpException (0x80004005): Could not access 'CDO.Message' object.]
System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
methodName, Object[] args) +113
System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1842
System.Web.Mail.SmtpMail.Send(MailMessage message) +150
C2Commerce.prdEmailInfo.SendEmail_Click(Object sender,
ImageClickEventArgs e) in
D:\Websites\Crane\CraneRetailTest\prdEma
ilInfo.aspx.cs:167

[C2CommerceException]
C2Commerce.prdEmailInfo.SendEmail_Click(Object sender,
ImageClickEventArgs e) in
D:\Websites\Crane\CraneRetailTest\prdEma
ilInfo.aspx.cs:183
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +109

System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.Ra
isePostBackEvent(String eventArgument) +69
System.Web.UI.Page. RaisePostBackEvent(IPostBackEventHandler

sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1247

Is anyone else using CDOSYS on Windows 2003 and seeing similar problems? I
realize this isn't a Commerce Server issue. Can anyone point me toward the
right newsgroup for posting this problem?

Thanks,
Zoe


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com