Page 1 of 1
Configurar GMail para poder enviar con CDOSYS
Posted: Thu Sep 17, 2020 10:22 pm
by noe aburto
Saludos
Recuerdo haber realizado una configuracion en gmail para poder enviar correos con cdosys.
Ahora con estas versiones me marca errores que he visto en el foro. Pero no lo resuelvo....
Envoi Message Impossible
Errour 1
SubC 1006
OS Code -2147352573
Subsystem WINOLE
Message Argument error
Sugerencias
Re: Configurar GMail para poder enviar con CDOSYS
Posted: Thu Sep 17, 2020 10:32 pm
by noe aburto
codigo principal
Code: Select all | Expand
Try oCfg := CreateObject
( "CDO.Configuration" ) With Object oCfg:
Fields :
Item( cdoSMTPServer
):
Value := AllTrim
( cMailServer
) // www.gmail.com :
Item( cdoSMTPServerPort
):
Value :=
465 :
Item( cdoSendUsing
):
Value :=
2 If lAuth
:
Item( cdoSMTPAuthenticate
):
Value := .T.
:
Item( cdoSendUserName
):
Value := naburtos
:
Item( cdoSendPassword
):
Value := AllTrim
( cPass
) // mi clave :
Item( cdoSMTPUseSSL
):
Value := .T.
EndIf :
Item( cdoSMTPConnectionTimeout
):
Value :=
30 :
Update() End With
oMsg := CreateObject
( "CDO.Message" ) With Object oMsg
:
Configuration := oCfg
:
From := AllTrim
( cFrom
) // naburtos@gmail.com :
To := AllTrim
( cTo
) // noeaburto67@hotmail.com :
Subject := AllTrim
( cSubject
) :
TextBody := AllTrim
( cBody
) For nEle :=
1 To Len
( aAttach
) if File
( AllTrim
( aAttach
[ nEle
] ) ) *:
AddAttachment := AllTrim
( aAttach
[ nEle
] ) :
AddAttachment ( AllTrim
( aAttach
[ nEle
] ) ) else Aviso
({'El archivo adjunto '+Upper
(AllTrim
( aAttach
[ nEle
] )),;
'no serĂ¡ enviado, no existe'}) endif Next If ! Empty
( cBCC
) :
BCC := AllTrim
( cBCC
) EndIf :
Send() End With
Re: Configurar GMail para poder enviar con CDOSYS
Posted: Thu Sep 17, 2020 10:35 pm
by noe aburto
perdon:
cMailServer := "smtp.gmail.com"
Re: Configurar GMail para poder enviar con CDOSYS
Posted: Thu Sep 17, 2020 11:04 pm
by karinha
Simples:
Permitir aplicaciones menos seguras: DESACTIVADO. -> Active para usar.
https://myaccount.google.com/lesssecureapps?pli=1Regards, saludos.
Re: Configurar GMail para poder enviar con CDOSYS
Posted: Fri Sep 18, 2020 12:07 am
by noe aburto
Gracias karinha... con esa habilitaci{on quedo listo.