PC Review


Reply
Thread Tools Rate Thread

CDO.Send failed to connect to the server

 
 
AB
Guest
Posts: n/a
 
      20th Aug 2010
Hi,

The below code had been working fine for ages (XP, Office 2003) and
now that I switched to a new pc and W7, Office 2010 it fails to send
email (i.e., fails to connect to the server). There must be a simple
fix for this that i'm unable to locate. Your help would be greatly
appreciated!

The code that works fine on my old machine:

Sub SendMyMail()
Dim cdomsg As CDO.Message

Set cdomsg = New CDO.Message
With cdomsg.Configuration.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
= 2 'NTLM method
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "smtp.gmail.com"
.Item("http://schemas.microsoft.com/cdo/configuration/
smptserverport") = 465 '587
.Item("http://schemas.microsoft.com/cdo/configuration/
smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl")
= True
.Item("http://schemas.microsoft.com/cdo/configuration/
smtpconnectiontimeout") = 60
.Item("http://schemas.microsoft.com/cdo/configuration/
sendusername") = "(E-Mail Removed)"
.Item("http://schemas.microsoft.com/cdo/configuration/
sendpassword") = "myPwd"
.Update
End With

With cdomsg
.To = "(E-Mail Removed)"
.From = "(E-Mail Removed)"
.Subject = "mySubj "
.TextBody = "myText"
.send

End Sub

So, on the .send line it fails with error: "The transport failed to
connect to the server.". I tried disabling Firewall alltogether but to
no avail (i.e., i disabled the firewall but it didn't make a
difference).
Any ideas?

A.
 
Reply With Quote
 
 
 
 
AB
Guest
Posts: n/a
 
      20th Aug 2010
Having wasted a good few hours i did the following:
- enabled IIS on my pc (but i don't know if it had to be done)
- spotted/fixed silly (a very silly one) typo in "smptserverport"
i.e., smpt as oppose to smtp
and then it started working again...
Nevertheless - can anyone advise if enabling the IIS services on the
machine would make a difference? I realize that the typo was a show
stopper but is there any CDO.Send dependancy on the IIS running on the
pc?

A.

On Aug 20, 9:09*am, AB <austris.bahanovs...@gmail.com> wrote:
> Hi,
>
> The below code had been working fine for ages (XP, Office 2003) and
> now that I switched to a new pc and W7, Office 2010 it fails to send
> email (i.e., fails to connect to the server). There must be a simple
> fix for this that i'm unable to locate. Your help would be greatly
> appreciated!
>
> The code that works fine on my old machine:
>
> Sub SendMyMail()
> * * Dim cdomsg As CDO.Message
>
> * * Set cdomsg = New CDO.Message
> * * With cdomsg.Configuration.Fields
> * * .Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
> = 2 'NTLM method
> * * .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
> = "smtp.gmail.com"
> * * .Item("http://schemas.microsoft.com/cdo/configuration/
> smptserverport") = 465 '587
> * * .Item("http://schemas.microsoft.com/cdo/configuration/
> smtpauthenticate") = 1
> * * .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl")
> = True
> * * .Item("http://schemas.microsoft.com/cdo/configuration/
> smtpconnectiontimeout") = 60
> * * .Item("http://schemas.microsoft.com/cdo/configuration/
> sendusername") = "myM...@gmail.com"
> * * .Item("http://schemas.microsoft.com/cdo/configuration/
> sendpassword") = "myPwd"
> * * .Update
> * * End With
>
> * * With cdomsg
> * * .To = "myM...@gmail.com"
> * * .From = "myM...@gmail.com"
> * * .Subject = "mySubj "
> * * .TextBody = "myText"
> * * .send
>
> End Sub
>
> So, on the .send line it fails with error: "The transport failed to
> connect to the server.". I tried disabling Firewall alltogether but to
> no avail (i.e., i disabled the firewall but it didn't make a
> difference).
> Any ideas?
>
> A.


 
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
Failed to connect ot server Diane B Windows Vista General Discussion 0 10th Sep 2007 11:30 PM
Transport failed to connect to the server dancer Microsoft ASP .NET 1 16th Jun 2007 07:14 AM
failed to connect to SQL server from asp.net ajfish@blueyonder.co.uk Microsoft ASP .NET 2 12th Jun 2006 02:48 PM
Re: failed to connect to SQL server from asp.net Bob Barrows [MVP] Microsoft ASP .NET 0 7th Jun 2006 06:07 PM
Transport Failed to connect to the Server. Sudhan Microsoft ASP .NET 1 20th Dec 2005 09:22 AM


Features
 

Advertising
 

Newsgroups
 


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