...
DEFINE BUTTON OF oBar ;
ACTION Blat( "Este e o corpo da mensagem",;
"smtp.itelefonica.com.br",;
"jscrocha@terra.com.br",;
"irochinha@itelefonica.com.br",;
"Greetings from Joe!",;
"Usuario",;
"Senha",;
"c:\autoexec.bat" ) TOOLTIP "Enviar Mail"
...
...
function blat( cbody ,;
cserver ,;
cMailTo ,;
cMailFrom ,;
csubject ,;
cUserEmail ,;
cUserPassWord ,;
cattach )
BlatCMD := [ blat.txt] + ;
[ -server ] + alltrim(cserver) + ;
[ -to ] + alltrim(cMailTo) + ;
[ -f ] + alltrim(cf) + ;
[ -mailfrom ] + alltrim(cMailFrom) + ;
[ -subject "] + alltrim(csubject) + ["] + ;
[ -r ] + ;
[ -u ] + alltrim(cUserEmail) + ;
[ -pw ] + alltrim(cUserPassWord) + ;
[ -log "email.log" -debug ] + ;
iif( empty( cAttach ),[],[ -attach "] + alltrim(cattach) + ["])
cMacro="BLAT.EXE " + BlatCMD
fErase( "email.log" )
cBody := FormHtml( cSubject, cBody )
memowrit( "blat.txt", cbody )
//memowrit( "blat.bat", cMacro )
WinExec( cMacro, 0 )
if file( "email.log" )
BlatLOG := memoread( "email.log" )
if "ERROR" $ Upper(BlatLOG)
Mensagem( "Erro: arquivo de EMAIL.LOG foi criado" )
return .f.
endif
endif
RETURN .T.
...
function blat( cbody ,;
cserver ,;
cMailTo ,;
cf,;
cMailFrom ,;
csubject ,;
cUserEmail ,;
cUserPassWord ,;
cattach )
BlatCMD := [ blat.txt] + ;
[ -server ] + alltrim(cserver) + ;
[ -to ] + alltrim(cMailTo) + ;
[ -f ] + alltrim(cf) + ;
[ -mailfrom ] + alltrim(cMailFrom) + ;
[ -subject "] + alltrim(csubject) + ["] + ;
[ -r ] + ;
[ -u ] + alltrim(cUserEmail) + ;
[ -pw ] + alltrim(cUserPassWord) + ;
[ -log "email.log" -debug ] + ;
iif( empty( cAttach ),[],[ -attach "] + alltrim(cattach) + ["])
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 51 guests