I'm trying to use MS CDO to send emails.
I can do it as long as the server does not require SSL authentication.
Here is the configuration I tried for Gmail
I tried both prts 465 and 587
I tried both "MyUserName" and "MyUserName@gmail.com"
Nothing worked.
I can send emails if I use a server that does not require SSL
I can do it as long as the server does not require SSL authentication.
Here is the configuration I tried for Gmail
Code:
'With objCDOMessage.Configuration.Fields
' .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' 2 = cdoSendUsingPort, Send the message using the network (SMTP over the network)
' .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
' .Item("http://schemas.microsoft.com/cdo/configuration/smptserverport") = 465
' .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 ' 1 = cdoBasic, Use basic (clear-text) authentication
' .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") = MyUserName
' .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = MyPass
' .Update
'End With
I tried both "MyUserName" and "MyUserName@gmail.com"
Nothing worked.
I can send emails if I use a server that does not require SSL