PC Review


Reply
Thread Tools Rate Thread

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

 
 
Tech_vs_Life
Guest
Posts: n/a
 
      19th Mar 2007
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 = "(E-Mail Removed)"
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 = "(E-Mail Removed)"
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


 
Reply With Quote
 
 
 
 
Gary VanderMolen
Guest
Posts: n/a
 
      19th Mar 2007
This newsgroup doesn't deal with advanced Outlook issues,
being mainly devoted to the Windows Mail client.
You should post to an Office newsgroup.

Gary VanderMolen

"Tech_vs_Life" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
> 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 = "(E-Mail Removed)"
> 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 = "(E-Mail Removed)"
> 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
>
>

 
Reply With Quote
 
Tech_vs_Life
Guest
Posts: n/a
 
      20th Mar 2007
Yes, it seems either something broke in cdosys with vista, or vista requires
some peculiar, new, & unknown configuration change to get it to work.


"Rick489" <(E-Mail Removed)> wrote in message
news:6573F729-05F0-4444-96E3-(E-Mail Removed)...
> 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 = "(E-Mail Removed)"
>> 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 = "(E-Mail Removed)"
>> 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
>>
>>
>>


 
Reply With Quote
 
Steve Cochran
Guest
Posts: n/a
 
      23rd Mar 2007
My guess its in this line:

>> !cdoSendUsingMethod = cdoSendUsingPort


steve

"Tech_vs_Life" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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 = "(E-Mail Removed)"
> 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 = "(E-Mail Removed)"
> 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
>
>


 
Reply With Quote
 
Tech_vs_Life
Guest
Posts: n/a
 
      26th Mar 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> My guess its in this line:
>
>>> !cdoSendUsingMethod = cdoSendUsingPort

>
> steve
>
> "Tech_vs_Life" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> 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 = "(E-Mail Removed)"
>> 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 = "(E-Mail Removed)"
>> 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
>>
>>

>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SMTP errors Arne Microsoft Outlook Discussion 1 22nd Jul 2009 02:53 PM
cdo SMTP errors in Vista -- (worked) in XP Tech_vs_Life Microsoft Access VBA Modules 6 24th Sep 2007 01:12 PM
cdo SMTP errors in Vista -- (worked) in XP Tech_vs_Life Windows Vista Installation 7 24th Sep 2007 01:12 PM
cdo SMTP errors in Vista -- (worked) in XP Tech_vs_Life Windows Vista General Discussion 3 26th Mar 2007 09:15 AM
Target Designer worked once -- now many 'file not found' errors =?Utf-8?B?S2V2aW5I?= Windows XP Embedded 2 8th Apr 2006 05:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:17 PM.