Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   Communications (http://www.xtremevbtalk.com/communications/)
-   -   Email with CDO "the transport failed to connect to the server" (http://www.xtremevbtalk.com/communications/327687-email-cdo-transport-failed-connect-server.html)

Maany 07-06-2015 01:39 AM

Email with CDO "the transport failed to connect to the server"
Hey all,

I'm trying to send an email from my app using CDO, unfortunately i don't have admin rights on my pc (not sure if this is the cause for the problem) whenever my app tries to send an email i get the "the transport failed to connect to the server" error, have tried increasing timeout and even creating a new gmail account with no use.

any idea how to fix it ? it's driving me crazy !:confused:


Dim ObjSendMail
    Set ObjSendMail = CreateObject("CDO.Message")
    With ObjSendMail.Configuration.Fields
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
 .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 1000
  .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username@gmail.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "userpassword"
    End With
    If Text24.Text = "" Then
        ObjSendMail.To = "receipnt@email.com"
        ObjSendMail.To = Text24.Text
    End If
    ObjSendMail.Subject = MSG_TEXT
    ObjSendMail.From = "sender@gmail.com"

    ObjSendMail.HTMLBody = MSG_TEXT


    Set ObjSendMail = Nothing

All times are GMT -6. The time now is 02:08 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.