tengo este codigo que copie de un post de gregory filatov, pero no me funciona. alguien me puede decir por que?
se compila sin problema y aparentemente funciona bien, pero me dice "Correo NO enviado"
hi all:
i have this gregory filatov's code, but it does not work to me. can someone help me?
it works apparently with out problem but the final result is "UNSENT MAIL"
saludos / regards.
Code: Select all
#include "hmg.ch"
Function Main()
set century on
set date ital
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 200 ;
HEIGHT 200 ;
MAIN;
TITLE 'Button Test'
@ 30,70 BUTTON Button_1 WIDTH 50 HEIGHT 50 ACTION ENVIARCORREO()
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return
FUNCTION ENVIARCORREO()
cSMTPServer := "smtp.smartnext.com"
cPopServer := "mail.smartnext.com"
cFrom := "facturacion@zuca.com.mx"
cTo := "creydav@gmail.com"
cSMTPPassWord := "micontrasena"
// hb_SendMail( cServer, nPort, cFrom, xTo, xCC, xBCC, cBody, cSubject, aFiles, cUser, cPass, cPopServer, nPriority, lRead, bTrace, lPopAuth, lNoAuth, nTimeOut, cReplyTo, lTLS, cSMTPPass, cCharset, cEncoding )
MsgInfo( iif(hb_SendMail( cSMTPServer,;
NIL,;
cFrom,;
cTo,;
NIL /* CC */,;
NIL /* BCC */,;
"test: body",;
"test: subject",;
NIL /* attachment */,;
cFrom,;
cSMTPPassword,;
cPopServer,;
NIL /* nPriority */,;
NIL /* lRead */,;
.F. /* lTrace */,;
.T. /* lPopAuth */,;
.F. /* lNoAuth */,;
NIL /* nTimeOut */,;
NIL /* cReplyTo */,;
.F. /* lTLS */,;
cSMTPPassWord ), "Correo enviado satistactoriamente", "Correo NO enviado"), "Resultado" )
RETURN