Ver Mensaje Individual
  #2 (permalink)  
Antiguo 15/08/2013, 02:01
neofilo
 
Fecha de Ingreso: abril-2012
Ubicación: Madrid (España)
Mensajes: 162
Antigüedad: 12 años, 7 meses
Puntos: 5
Respuesta: Error al enviar mails con CDO.Message

Me respondo a mi Mismo:

Lo he conseguido de la siguiente forma:

Código:
Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message")

'This section provides the configuration information for the remote SMTP server.

ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="smtp.1and1.es"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password.
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="[email protected]"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="XXXXXXX."

ObjSendMail.Configuration.Fields.Update

'End remote SMTP server configuration section==

ObjSendMail.To = "[email protected]"
ObjSendMail.Subject = "Asunto"
ObjSendMail.From = "Procede de <[email protected]>"


'ObjSendMail.HTMLBody = "this is the body"
ObjSendMail.TextBody = "Este es el cuerpo del mensaje"

ObjSendMail.Send

Set ObjSendMail = Nothing