CDO error in VBA
CDO error in VBA
hello I am using the following code to send emails
Public Function SendMail(Para As String, Asunto As String, mensaje As String) Dim Obj As Object Set Obj = CreateObject("CDO.Message") With Obj.Configuration.Fields .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.zoho.com" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "sistematod@zoho.com" .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "*********" .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Update End With With Obj
.to = Para
.From = "TuCorreo@gmail.com"
.Subject = Asunto
.TextBody = mensaje
End With
HELP: it gives me an error