|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB 6 and CDOSYS2003 server using CDOSYS.dll. Occasionally I receive the following error: Error Number: -2147220960 Message: The "SendUsing" configuration value is invalid. The fixes described by MS don't seem to apply to this situation. I have tried creating a Configuration object and valuing the SendUsingMethod (with cdoSendUsingPickup), but that doesn't see to make a difference. The code that calls CDO is: mobjCDO.CC = strCc mobjCDO.BCC = strBcc mobjCDO.From = strFrom mobjCDO.To = strTo mobjCDO.Subject = strSubject mobjCDO.TextBody = strBody mobjCDO.Fields.Item(cdoImportance) = lngImportance mobjCDO.Fields.Update mobjCDO.Send What am I missing? I believe it's saying that you don't have a local SMTP server, and so a
SendUsing of cdoSendUsingPickup is not valid. Sounds like you need to set more configuration options and access an external mail server. A local SMTP service is installed as part of IIS, as is CDONTS - which can only access that local service. Does your machine have IIS installed. Tony Proctor <rakia***@hotmail.com> wrote in message Show quoteHide quote news:1131763970.929460.133730@f14g2000cwb.googlegroups.com... > I am trying to send email from a VB ActiveX DLL in COM+ on a Windows > 2003 server using CDOSYS.dll. Occasionally I receive the following > error: > > > Error Number: -2147220960 > Message: The "SendUsing" configuration value is invalid. > > > The fixes described by MS don't seem to apply to this situation. I > have tried creating a Configuration object and valuing the > SendUsingMethod (with cdoSendUsingPickup), but that doesn't see to make > > a difference. The code that calls CDO is: > > > mobjCDO.CC = strCc > mobjCDO.BCC = strBcc > mobjCDO.From = strFrom > mobjCDO.To = strTo > mobjCDO.Subject = strSubject > mobjCDO.TextBody = strBody > mobjCDO.Fields.Item(cdoImportance) = lngImportance > mobjCDO.Fields.Update > > > mobjCDO.Send > > > What am I missing? > Alternatively, check the cdoSMTPServerPickupDirectory and cdoSMTPServer.
Sometimes, even if you have a local SMTP service, the cdoSMTPServer field needs to be forced to "localhost" Tony Proctor Show quoteHide quote "Tony Proctor" <tony_proctor@aimtechnology_NoMoreSPAM_.com> wrote in message news:ul8LPZG6FHA.1140@tk2msftngp13.phx.gbl... > I believe it's saying that you don't have a local SMTP server, and so a > SendUsing of cdoSendUsingPickup is not valid. Sounds like you need to set > more configuration options and access an external mail server. > > A local SMTP service is installed as part of IIS, as is CDONTS - which can > only access that local service. Does your machine have IIS installed. > > Tony Proctor > > <rakia***@hotmail.com> wrote in message > news:1131763970.929460.133730@f14g2000cwb.googlegroups.com... > > I am trying to send email from a VB ActiveX DLL in COM+ on a Windows > > 2003 server using CDOSYS.dll. Occasionally I receive the following > > error: > > > > > > Error Number: -2147220960 > > Message: The "SendUsing" configuration value is invalid. > > > > > > The fixes described by MS don't seem to apply to this situation. I > > have tried creating a Configuration object and valuing the > > SendUsingMethod (with cdoSendUsingPickup), but that doesn't see to make > > > > a difference. The code that calls CDO is: > > > > > > mobjCDO.CC = strCc > > mobjCDO.BCC = strBcc > > mobjCDO.From = strFrom > > mobjCDO.To = strTo > > mobjCDO.Subject = strSubject > > mobjCDO.TextBody = strBody > > mobjCDO.Fields.Item(cdoImportance) = lngImportance > > mobjCDO.Fields.Update > > > > > > mobjCDO.Send > > > > > > What am I missing? > > > > The server is running IIS 6.0 with the SMTP service running. The
server is on our company's intranet so we have SMTP pointed at a mail forwarder as the smart host. I tried setting the cdoSendUsingMethod, cdoSMTPServerPickupDirectory, and cdoSMTPServer, but it still occasionally fails. It does not fail often, maybe 1 out of 500 times, which makes it difficult to pinpoint. I have not been able to make it fail under the same circumstances. <rakia***@hotmail.com> wrote:
> The server is running IIS 6.0 with the SMTP service Maybe the server is busy at that moment, introduces a> running. delay ? Set a trap for that error, repeat trying to send that particular data, log the attempt as to which data in particular failed, the time and compare to the server side event log messages at that particular time. > The server is on our company's intranet so we have Didn't look up the error message but guessing, maybe> SMTP pointed at a mail forwarder as the smart host. the forwarder is busy, taking too much time, or maybe it failed to deliver a message because a remote host is down? Hope this provides some insights. -- Show quoteHide quoteJim Carlock Post replies to the newsgroup, thanks. <rakia***@hotmail.com> further mentioned: > I tried setting the cdoSendUsingMethod, > cdoSMTPServerPickupDirectory, and > cdoSMTPServer, but it still occasionally fails. It > does not fail often, maybe 1 out of 500 times, > which makes it difficult to pinpoint. > > I have not been able to make it fail under the > same circumstances. Just a thought - Are you creating a message configuration object for each
message. I have discovered that CDOSYS is rather flakey when you don't. Mike Ober. Show quoteHide quote "Jim Carlock >" <?Utf-8?B?am9lMjE1?= <jimcarl***@discussions.microsoft.com> wrote in message news:%23H7zfka6FHA.1020@TK2MSFTNGP15.phx.gbl... > <rakia***@hotmail.com> wrote: > > The server is running IIS 6.0 with the SMTP service > > running. > > Maybe the server is busy at that moment, introduces a > delay ? > > Set a trap for that error, repeat trying to send that > particular data, log the attempt as to which data in > particular failed, the time and compare to the server > side event log messages at that particular time. > > > The server is on our company's intranet so we have > > SMTP pointed at a mail forwarder as the smart host. > > Didn't look up the error message but guessing, maybe > the forwarder is busy, taking too much time, or maybe > it failed to deliver a message because a remote host is > down? > > Hope this provides some insights. > > -- > Jim Carlock > Post replies to the newsgroup, thanks. > > <rakia***@hotmail.com> further mentioned: > > I tried setting the cdoSendUsingMethod, > > cdoSMTPServerPickupDirectory, and > > cdoSMTPServer, but it still occasionally fails. It > > does not fail often, maybe 1 out of 500 times, > > which makes it difficult to pinpoint. > > > > I have not been able to make it fail under the > > same circumstances. > > > I was able to trap an occurrence of the error and log the configuration
values. The SendUsing and PickupDirectory values were empty. In an errorhandler I was able to modify the values and resubmit the email and it worked. Previously when I had been setting the configuration values I wasn't issuing an Update on the fields, so I guess it wasn't taking. A question on the update - do I need to issue an update on both the configuration object and the CDO.Message object or will one update on the Message object suffice? So as long as I explicitly set the SendUsing and PickupDirectory before calling the Send method, it seems to always work. I don't like the idea of having to hardcode the PickupDirectory path in my code, but something seems to be causing the Message object to not be able to get that info. FYI - A new Message object (therefore Configuration object) is created for each email sent. Thanks. |
|||||||||||||||||||||||