Baxajaun, gracias por los links, vere si ahi hay algo que puedo aplicar.
Carlos, gracias por contestar, adjunto mi codigo, ojala exista forma de hacerlo funcionar con cuentas de mail de Office 365
TRY
oEmailCfg := CREATEOBJECT( "CDO.Configuration" )
WITH OBJECT oEmailCfg:Fields
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpserver" ):Value := alltrim(cServer)
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpserverport" ):Value := nPuerto // Donde 465 es paga GMAIL y 25 es (por ejemplo) para mail.consorcioinformatico.com
:Item( "http://schemas.microsoft.com/cdo/configuration/sendusing" ):Value := 2 // Remote SMTP = 2, local = 1
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ):Value := iif(cAutmail=="S",1,0) // smtpauthenticate, values are : cdoAnonymous, value 0. Do not authenticate, cdoBasic, value 1. Use basic clear-text authentication. When using this option you have to provide the user name and password through the sendusername and sendpassword fields, cdoNTLM, value 2. The current process security context is used to authenticate with the service.
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpusessl" ):Value := iif(cSslmail=="S",.T.,.F.)
:Item( "http://schemas.microsoft.com/cdo/configuration/sendusername" ):Value := alltrim(cUsrMail)
:Item( "http://schemas.microsoft.com/cdo/configuration/sendpassword" ):Value := alltrim(cUsrPass) // Password
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"):Value := 30
:Update()
END WITH
CATCH oError
MsgInfo( "Could not send message" + ";" + ;"Error: " + TRANSFORM(oError:GenCode, NIL) + ";" + ;"SubC: " + TRANSFORM(oError:SubCode, NIL) + ";" + ;"OSCode: " + TRANSFORM(oError:OsCode, NIL) + ";" + ;"SubSystem: " + TRANSFORM(oError:SubSystem, NIL) + ";" + ;"Message: " + oError:Description )
END
oError:=NIL
↧