strProfile = ALLTRIM(cuentadespacho)
strUsuario = ALLTRIM(usuariodespacho)
strPassword = ALLTRIM(pwsdespacho)
strSmtp = ALLTRIM(CsrMensaje.smtp)
loCfg = CREATEOBJECT("CDO.Configuration")
WITH loCfg.Fields
.Update
ENDWITH
loMsg = CREATEOBJECT ("CDO.Message")
WITH loMsg
.Configuration = loCfg
.From = StrProfile
ENDWITH
STORE '' TO StrHtmlBody,strAttach,strSubject
strpara = ALLTRIM(destino)
lcTipoArch = ""
StrAttach = ALLTRIM(CsrMensaje.archivopdf)
TRY
WITH loMsg
.To = strpara
.Subject = strSubject
.HTMLBody = strHtmlBody
.AddAttachment(strAttach)
.Send()
ENDWITH
CATCH TO oException
ENDTRY