Home All Groups Group Topic Archive Search About

cdo SMTP errors in Vista -- (worked) in XP

Author
19 Mar 2007 5:58 AM
Tech_vs_Life
After switching from XP to Vista, I'm having problems with some code that
makes use of cdo (I'm using my ISP email account to send mail via smtp).

Initially I got back an error:
The 'SendUsing' configuration value is invalid.

But after configuring Windows mail and Outlook with the email account (a
step that used to resolve cdo problems on XP), the same code produced an
entirely different error:

Error reported: -2147220975.  The message could not be sent to the SMTP
Server.  The transport error code was 0x80040217.  The server response was
not available.

Sending via Windows mail or Outlook works fine, but I need to send via cdo
code.

Note that this code worked fine in XP.  The code is as follows (I've already
tried setting cdoSMTPUseSSL to false, but it didn't help.):

    Const ksFrom As String = "SenderN***@comcast.net"
    Dim oCfg As cdo.Configuration
    Dim oMsg As cdo.Message

    Set oCfg = New cdo.Configuration
    With oCfg.Fields
        !cdoSendUsingMethod = cdoSendUsingPort
        !cdoSMTPServer = "smtp.comcast.net"
        !cdoSMTPServerPort = 25
        !cdoSMTPConnectionTimeout = 120
        !cdoSMTPAuthenticate = cdoBasic
        !cdoSMTPUseSSL = True
        !cdoSendUserName = "SenderName"
        !cdoSendPassword = "password"
        .Update
    End With
    Set oMsg = New cdo.Message
    With oMsg
        Set .Configuration = oCfg
        .To = sTo
        .From = ksFrom
        .Sender = ksFrom
        .Subject = sSubject
        .ReplyTo = "SenderNa***@gmail.com"
        If Len(sCC) Then .CC = sCC
        If Len(sBCC) Then .BCC = sBCC
        If Len(sFileName) Then .AddAttachment sFileName
        If Len(sMsg) Then .TextBody = sMsg
        .Send
    End With
    Set oMsg = Nothing
    Set oCfg = Nothing
    EmailDocs = True
    Exit Function

Author
19 Mar 2007 8:08 PM
Ralph
Have you tried testing the connection with Telnet?

http://support.microsoft.com/kb/153119/en-us




Show quote
"Tech_vs_Life" wrote:

> After switching from XP to Vista, I'm having problems with some code that
> makes use of cdo (I'm using my ISP email account to send mail via smtp).
>
> Initially I got back an error:
> The 'SendUsing' configuration value is invalid.
>
> But after configuring Windows mail and Outlook with the email account (a
> step that used to resolve cdo problems on XP), the same code produced an
> entirely different error:
>
> Error reported: -2147220975.  The message could not be sent to the SMTP
> Server.  The transport error code was 0x80040217.  The server response was
> not available.
>
> Sending via Windows mail or Outlook works fine, but I need to send via cdo
> code.
>
> Note that this code worked fine in XP.  The code is as follows (I've already
> tried setting cdoSMTPUseSSL to false, but it didn't help.):
>
>     Const ksFrom As String = "SenderN***@comcast.net"
>     Dim oCfg As cdo.Configuration
>     Dim oMsg As cdo.Message
>
>     Set oCfg = New cdo.Configuration
>     With oCfg.Fields
>         !cdoSendUsingMethod = cdoSendUsingPort
>         !cdoSMTPServer = "smtp.comcast.net"
>         !cdoSMTPServerPort = 25
>         !cdoSMTPConnectionTimeout = 120
>         !cdoSMTPAuthenticate = cdoBasic
>         !cdoSMTPUseSSL = True
>         !cdoSendUserName = "SenderName"
>         !cdoSendPassword = "password"
>         .Update
>     End With
>     Set oMsg = New cdo.Message
>     With oMsg
>         Set .Configuration = oCfg
>         .To = sTo
>         .From = ksFrom
>         .Sender = ksFrom
>         .Subject = sSubject
>         .ReplyTo = "SenderNa***@gmail.com"
>         If Len(sCC) Then .CC = sCC
>         If Len(sBCC) Then .BCC = sBCC
>         If Len(sFileName) Then .AddAttachment sFileName
>         If Len(sMsg) Then .TextBody = sMsg
>         .Send
>     End With
>     Set oMsg = Nothing
>     Set oCfg = Nothing
>     EmailDocs = True
>     Exit Function
>
>
>
Author
20 Mar 2007 9:32 AM
Tech_vs_Life
Yes, I can telnet to the comcast smtp server.  I can also smtp email via
blat.  But cdosys is no longer working in vista, with identical code, that
used to work in xp.  Is it possible the removal of the smtp server in vista
has something to do with the problem?


Show quote
"Ralph" <Ra***@discussions.microsoft.com> wrote in message
news:FE6B0658-A57A-40D9-9191-0CADE47E7F0A@microsoft.com...
> Have you tried testing the connection with Telnet?
>
> http://support.microsoft.com/kb/153119/en-us
>
>
>
>
> "Tech_vs_Life" wrote:
>
>> After switching from XP to Vista, I'm having problems with some code that
>> makes use of cdo (I'm using my ISP email account to send mail via smtp).
>>
>> Initially I got back an error:
>> The 'SendUsing' configuration value is invalid.
>>
>> But after configuring Windows mail and Outlook with the email account (a
>> step that used to resolve cdo problems on XP), the same code produced an
>> entirely different error:
>>
>> Error reported: -2147220975.  The message could not be sent to the SMTP
>> Server.  The transport error code was 0x80040217.  The server response
>> was
>> not available.
>>
>> Sending via Windows mail or Outlook works fine, but I need to send via
>> cdo
>> code.
>>
>> Note that this code worked fine in XP.  The code is as follows (I've
>> already
>> tried setting cdoSMTPUseSSL to false, but it didn't help.):
>>
>>     Const ksFrom As String = "SenderN***@comcast.net"
>>     Dim oCfg As cdo.Configuration
>>     Dim oMsg As cdo.Message
>>
>>     Set oCfg = New cdo.Configuration
>>     With oCfg.Fields
>>         !cdoSendUsingMethod = cdoSendUsingPort
>>         !cdoSMTPServer = "smtp.comcast.net"
>>         !cdoSMTPServerPort = 25
>>         !cdoSMTPConnectionTimeout = 120
>>         !cdoSMTPAuthenticate = cdoBasic
>>         !cdoSMTPUseSSL = True
>>         !cdoSendUserName = "SenderName"
>>         !cdoSendPassword = "password"
>>         .Update
>>     End With
>>     Set oMsg = New cdo.Message
>>     With oMsg
>>         Set .Configuration = oCfg
>>         .To = sTo
>>         .From = ksFrom
>>         .Sender = ksFrom
>>         .Subject = sSubject
>>         .ReplyTo = "SenderNa***@gmail.com"
>>         If Len(sCC) Then .CC = sCC
>>         If Len(sBCC) Then .BCC = sBCC
>>         If Len(sFileName) Then .AddAttachment sFileName
>>         If Len(sMsg) Then .TextBody = sMsg
>>         .Send
>>     End With
>>     Set oMsg = Nothing
>>     Set oCfg = Nothing
>>     EmailDocs = True
>>     Exit Function
>>
>>
>>
Author
20 Mar 2007 12:17 AM
Rick489
I'm having the same problem using my host provider's package. It provided no
3rd party product. I've isolated the problem as being with both .Update and
..Send

Show quote
"Tech_vs_Life" wrote:

> After switching from XP to Vista, I'm having problems with some code that
> makes use of cdo (I'm using my ISP email account to send mail via smtp).
>
> Initially I got back an error:
> The 'SendUsing' configuration value is invalid.
>
> But after configuring Windows mail and Outlook with the email account (a
> step that used to resolve cdo problems on XP), the same code produced an
> entirely different error:
>
> Error reported: -2147220975.  The message could not be sent to the SMTP
> Server.  The transport error code was 0x80040217.  The server response was
> not available.
>
> Sending via Windows mail or Outlook works fine, but I need to send via cdo
> code.
>
> Note that this code worked fine in XP.  The code is as follows (I've already
> tried setting cdoSMTPUseSSL to false, but it didn't help.):
>
>     Const ksFrom As String = "SenderN***@comcast.net"
>     Dim oCfg As cdo.Configuration
>     Dim oMsg As cdo.Message
>
>     Set oCfg = New cdo.Configuration
>     With oCfg.Fields
>         !cdoSendUsingMethod = cdoSendUsingPort
>         !cdoSMTPServer = "smtp.comcast.net"
>         !cdoSMTPServerPort = 25
>         !cdoSMTPConnectionTimeout = 120
>         !cdoSMTPAuthenticate = cdoBasic
>         !cdoSMTPUseSSL = True
>         !cdoSendUserName = "SenderName"
>         !cdoSendPassword = "password"
>         .Update
>     End With
>     Set oMsg = New cdo.Message
>     With oMsg
>         Set .Configuration = oCfg
>         .To = sTo
>         .From = ksFrom
>         .Sender = ksFrom
>         .Subject = sSubject
>         .ReplyTo = "SenderNa***@gmail.com"
>         If Len(sCC) Then .CC = sCC
>         If Len(sBCC) Then .BCC = sBCC
>         If Len(sFileName) Then .AddAttachment sFileName
>         If Len(sMsg) Then .TextBody = sMsg
>         .Send
>     End With
>     Set oMsg = Nothing
>     Set oCfg = Nothing
>     EmailDocs = True
>     Exit Function
>
>
>
Author
20 Mar 2007 9:35 AM
Tech_vs_Life
Yes, it seems either something broke in cdosys with vista, or vista requires
some peculiar, new, & unknown configuration change to get it to work.


Show quote
"Rick489" <Rick***@discussions.microsoft.com> wrote in message
news:6573F729-05F0-4444-96E3-67E5FA6E5ABE@microsoft.com...
> I'm having the same problem using my host provider's package. It provided
> no
> 3rd party product. I've isolated the problem as being with both .Update
> and
> .Send
>
> "Tech_vs_Life" wrote:
>
>> After switching from XP to Vista, I'm having problems with some code that
>> makes use of cdo (I'm using my ISP email account to send mail via smtp).
>>
>> Initially I got back an error:
>> The 'SendUsing' configuration value is invalid.
>>
>> But after configuring Windows mail and Outlook with the email account (a
>> step that used to resolve cdo problems on XP), the same code produced an
>> entirely different error:
>>
>> Error reported: -2147220975.  The message could not be sent to the SMTP
>> Server.  The transport error code was 0x80040217.  The server response
>> was
>> not available.
>>
>> Sending via Windows mail or Outlook works fine, but I need to send via
>> cdo
>> code.
>>
>> Note that this code worked fine in XP.  The code is as follows (I've
>> already
>> tried setting cdoSMTPUseSSL to false, but it didn't help.):
>>
>>     Const ksFrom As String = "SenderN***@comcast.net"
>>     Dim oCfg As cdo.Configuration
>>     Dim oMsg As cdo.Message
>>
>>     Set oCfg = New cdo.Configuration
>>     With oCfg.Fields
>>         !cdoSendUsingMethod = cdoSendUsingPort
>>         !cdoSMTPServer = "smtp.comcast.net"
>>         !cdoSMTPServerPort = 25
>>         !cdoSMTPConnectionTimeout = 120
>>         !cdoSMTPAuthenticate = cdoBasic
>>         !cdoSMTPUseSSL = True
>>         !cdoSendUserName = "SenderName"
>>         !cdoSendPassword = "password"
>>         .Update
>>     End With
>>     Set oMsg = New cdo.Message
>>     With oMsg
>>         Set .Configuration = oCfg
>>         .To = sTo
>>         .From = ksFrom
>>         .Sender = ksFrom
>>         .Subject = sSubject
>>         .ReplyTo = "SenderNa***@gmail.com"
>>         If Len(sCC) Then .CC = sCC
>>         If Len(sBCC) Then .BCC = sBCC
>>         If Len(sFileName) Then .AddAttachment sFileName
>>         If Len(sMsg) Then .TextBody = sMsg
>>         .Send
>>     End With
>>     Set oMsg = Nothing
>>     Set oCfg = Nothing
>>     EmailDocs = True
>>     Exit Function
>>
>>
>>
Author
23 Mar 2007 2:47 PM
Steve Cochran
My guess its in this line:

>>         !cdoSendUsingMethod = cdoSendUsingPort

steve

Show quote
"Tech_vs_Life" <limited@newsgroups.nospam> wrote in message
news:%23GZttueaHHA.348@TK2MSFTNGP02.phx.gbl...
> After switching from XP to Vista, I'm having problems with some code that
> makes use of cdo (I'm using my ISP email account to send mail via smtp).
>
> Initially I got back an error:
> The 'SendUsing' configuration value is invalid.
>
> But after configuring Windows mail and Outlook with the email account (a
> step that used to resolve cdo problems on XP), the same code produced an
> entirely different error:
>
> Error reported: -2147220975.  The message could not be sent to the SMTP
> Server.  The transport error code was 0x80040217.  The server response was
> not available.
>
> Sending via Windows mail or Outlook works fine, but I need to send via cdo
> code.
>
> Note that this code worked fine in XP.  The code is as follows (I've
> already
> tried setting cdoSMTPUseSSL to false, but it didn't help.):
>
>    Const ksFrom As String = "SenderN***@comcast.net"
>    Dim oCfg As cdo.Configuration
>    Dim oMsg As cdo.Message
>
>    Set oCfg = New cdo.Configuration
>    With oCfg.Fields
>        !cdoSendUsingMethod = cdoSendUsingPort
>        !cdoSMTPServer = "smtp.comcast.net"
>        !cdoSMTPServerPort = 25
>        !cdoSMTPConnectionTimeout = 120
>        !cdoSMTPAuthenticate = cdoBasic
>        !cdoSMTPUseSSL = True
>        !cdoSendUserName = "SenderName"
>        !cdoSendPassword = "password"
>        .Update
>    End With
>    Set oMsg = New cdo.Message
>    With oMsg
>        Set .Configuration = oCfg
>        .To = sTo
>        .From = ksFrom
>        .Sender = ksFrom
>        .Subject = sSubject
>        .ReplyTo = "SenderNa***@gmail.com"
>        If Len(sCC) Then .CC = sCC
>        If Len(sBCC) Then .BCC = sBCC
>        If Len(sFileName) Then .AddAttachment sFileName
>        If Len(sMsg) Then .TextBody = sMsg
>        .Send
>    End With
>    Set oMsg = Nothing
>    Set oCfg = Nothing
>    EmailDocs = True
>    Exit Function
>
>
Author
26 Mar 2007 8:15 AM
Tech_vs_Life
Thanks.  I tried changing that, but it makes no difference.  (Also, the
correct value really is cdoSendUsingPort--unless there's been an unexpected
change in Vista.)

Show quote
"Steve Cochran" <scoch***@oehelp.com> wrote in message
news:ebgvgoVbHHA.260@TK2MSFTNGP02.phx.gbl...
> My guess its in this line:
>
>>>         !cdoSendUsingMethod = cdoSendUsingPort
>
> steve
>
> "Tech_vs_Life" <limited@newsgroups.nospam> wrote in message
> news:%23GZttueaHHA.348@TK2MSFTNGP02.phx.gbl...
>> After switching from XP to Vista, I'm having problems with some code that
>> makes use of cdo (I'm using my ISP email account to send mail via smtp).
>>
>> Initially I got back an error:
>> The 'SendUsing' configuration value is invalid.
>>
>> But after configuring Windows mail and Outlook with the email account (a
>> step that used to resolve cdo problems on XP), the same code produced an
>> entirely different error:
>>
>> Error reported: -2147220975.  The message could not be sent to the SMTP
>> Server.  The transport error code was 0x80040217.  The server response
>> was
>> not available.
>>
>> Sending via Windows mail or Outlook works fine, but I need to send via
>> cdo
>> code.
>>
>> Note that this code worked fine in XP.  The code is as follows (I've
>> already
>> tried setting cdoSMTPUseSSL to false, but it didn't help.):
>>
>>    Const ksFrom As String = "SenderN***@comcast.net"
>>    Dim oCfg As cdo.Configuration
>>    Dim oMsg As cdo.Message
>>
>>    Set oCfg = New cdo.Configuration
>>    With oCfg.Fields
>>        !cdoSendUsingMethod = cdoSendUsingPort
>>        !cdoSMTPServer = "smtp.comcast.net"
>>        !cdoSMTPServerPort = 25
>>        !cdoSMTPConnectionTimeout = 120
>>        !cdoSMTPAuthenticate = cdoBasic
>>        !cdoSMTPUseSSL = True
>>        !cdoSendUserName = "SenderName"
>>        !cdoSendPassword = "password"
>>        .Update
>>    End With
>>    Set oMsg = New cdo.Message
>>    With oMsg
>>        Set .Configuration = oCfg
>>        .To = sTo
>>        .From = ksFrom
>>        .Sender = ksFrom
>>        .Subject = sSubject
>>        .ReplyTo = "SenderNa***@gmail.com"
>>        If Len(sCC) Then .CC = sCC
>>        If Len(sBCC) Then .BCC = sBCC
>>        If Len(sFileName) Then .AddAttachment sFileName
>>        If Len(sMsg) Then .TextBody = sMsg
>>        .Send
>>    End With
>>    Set oMsg = Nothing
>>    Set oCfg = Nothing
>>    EmailDocs = True
>>    Exit Function
>>
>>
>
Author
24 Sep 2007 12:12 PM
David Mueller
I'm curious to know if you solved this.  I think I'll be running into this
problem soon.

Show quote
"Tech_vs_Life" wrote:

> Thanks.  I tried changing that, but it makes no difference.  (Also, the
> correct value really is cdoSendUsingPort--unless there's been an unexpected
> change in Vista.)
>
> "Steve Cochran" <scoch***@oehelp.com> wrote in message
> news:ebgvgoVbHHA.260@TK2MSFTNGP02.phx.gbl...
> > My guess its in this line:
> >
> >>>         !cdoSendUsingMethod = cdoSendUsingPort
> >
> > steve
> >
> > "Tech_vs_Life" <limited@newsgroups.nospam> wrote in message
> > news:%23GZttueaHHA.348@TK2MSFTNGP02.phx.gbl...
> >> After switching from XP to Vista, I'm having problems with some code that
> >> makes use of cdo (I'm using my ISP email account to send mail via smtp).
> >>
> >> Initially I got back an error:
> >> The 'SendUsing' configuration value is invalid.
> >>
> >> But after configuring Windows mail and Outlook with the email account (a
> >> step that used to resolve cdo problems on XP), the same code produced an
> >> entirely different error:
> >>
> >> Error reported: -2147220975.  The message could not be sent to the SMTP
> >> Server.  The transport error code was 0x80040217.  The server response
> >> was
> >> not available.
> >>
> >> Sending via Windows mail or Outlook works fine, but I need to send via
> >> cdo
> >> code.
> >>
> >> Note that this code worked fine in XP.  The code is as follows (I've
> >> already
> >> tried setting cdoSMTPUseSSL to false, but it didn't help.):
> >>
> >>    Const ksFrom As String = "SenderN***@comcast.net"
> >>    Dim oCfg As cdo.Configuration
> >>    Dim oMsg As cdo.Message
> >>
> >>    Set oCfg = New cdo.Configuration
> >>    With oCfg.Fields
> >>        !cdoSendUsingMethod = cdoSendUsingPort
> >>        !cdoSMTPServer = "smtp.comcast.net"
> >>        !cdoSMTPServerPort = 25
> >>        !cdoSMTPConnectionTimeout = 120
> >>        !cdoSMTPAuthenticate = cdoBasic
> >>        !cdoSMTPUseSSL = True
> >>        !cdoSendUserName = "SenderName"
> >>        !cdoSendPassword = "password"
> >>        .Update
> >>    End With
> >>    Set oMsg = New cdo.Message
> >>    With oMsg
> >>        Set .Configuration = oCfg
> >>        .To = sTo
> >>        .From = ksFrom
> >>        .Sender = ksFrom
> >>        .Subject = sSubject
> >>        .ReplyTo = "SenderNa***@gmail.com"
> >>        If Len(sCC) Then .CC = sCC
> >>        If Len(sBCC) Then .BCC = sBCC
> >>        If Len(sFileName) Then .AddAttachment sFileName
> >>        If Len(sMsg) Then .TextBody = sMsg
> >>        .Send
> >>    End With
> >>    Set oMsg = Nothing
> >>    Set oCfg = Nothing
> >>    EmailDocs = True
> >>    Exit Function
> >>
> >>
> >
>
>

AddThis Social Bookmark Button