Hi,
About three months ago my VB function using gmail to send email stopped working. I get the following error: "Run-time error '2147220973 (80040213)' The transport failed to connect to the server."
I've tried to the following with no success:
-Turning off antivirus/firewall
-Change send and from email addresses
-Use a different outgoing port (I've tested the ports using telnet and all is working fine)
Fyi, my system is Win 7 64 bit. Any help would be greatly appreciated.
My vb code is as follows:
Code:Public Sub GmailSend() Dim cdomsg Set cdomsg = CreateObject("CDO.message") With cdomsg.Configuration.Fields .Item("http://schemas.microsoft.com/cdo/con...tion/sendusing") = 2 'NTLM method .Item("http://schemas.microsoft.com/cdo/con...ion/smtpserver") = "smtp.gmail.com" .Item("http://schemas.microsoft.com/cdo/con...smptserverport") = 587 '995, 465, 587 .Item("http://schemas.microsoft.com/cdo/con...ion/smtpusessl") = 1 .Item("http://schemas.microsoft.com/cdo/con...tpauthenticate") = 1 .Item("http://schemas.microsoft.com/cdo/con...nectiontimeout") = 30 .Item("http://schemas.microsoft.com/cdo/con...n/sendusername") = "(full sender email address)" .Item("http://schemas.microsoft.com/cdo/con...n/sendpassword") = "(full sender password)" .Update End With ' build email parts With cdomsg .To = "(full recipient email address)" .From = "(full sender email address)" .Subject = "subject" .Addattachment "c:\temp\test.xls" .TextBody = "body text" .Send End With Set cdomsg = Nothing End Sub