Página 1 de 1

SMTPSEND

Enviado: 19 Dez 2004 15:57
por Augusto
Estou usando o SMTPSEND sem problemas dentro dos meus programas em Clipper... exceto aquela mensagem "chata" que ele dá quando está enviando o e-mail que mela a tela toda...
Já coloquei o "> NUL" depois do comando mais não adiantou...

Alguém tem uma solução para esse pequeno mais CHATO probleminha ??

Enviado: 19 Dez 2004 16:18
por Dudu_XBase
Augusto poste sua rotina por favor

Enviado: 19 Dez 2004 19:31
por Augusto
Dudu_XBase escreveu:Augusto poste sua rotina por favor

Código: Selecionar todos

orig=space(40)
dest=space(40)
cc  =space(40)
cco =space(40)
assu=space(40)
serv=space(40)
txt0=space(50)
txt1=space(50)
txt2=space(50)
txt3=space(50)
txt4=space(50)
txt5=space(50)
txt6=space(50)
txt7=space(50)
txt8=space(50)
txt9=space(50)
anex=space(30)
do while .t.
   do CTB066T
   @ 04,19 get orig valid empty(orig)=.f.
   @ 05,19 get dest valid empty(dest)=.f.
   @ 06,19 get cc  
   @ 07,19 get cco
   @ 08,19 get assu valid empty(assu)=.f.
   @ 09,19 get serv valid empty(serv)=.f.
   @ 10,19 get txt0
   @ 11,19 get txt1
   @ 12,19 get txt2
   @ 13,19 get txt3
   @ 14,19 get txt4
   @ 15,19 get txt5
   @ 16,19 get txt6
   @ 17,19 get txt7
   @ 18,19 get txt8
   @ 19,19 get txt9
   @ 20,19 get anex
   read
   if lastkey()=27
      op=7
      return
   endif
   do CONFIRMA
   if conf='N'
      loop
   endif
   set color to &cor_menss
   @ 24,00 clear to 24,79
   @ 24,01 say 'Aguarde... Enviando mensagem'
   set color to &cor

   mtxt=txt0+txt1+txt2+txt3+txt4+txt5+txt6+txt7+txt8+txt9

   arqm='texto'
   arqt='texto.txt'

   criaarq()

   use &arqm
   appe blan
   repl txt with rtrim(mtxt)
   commit
   copy to &arqt sdf
   use

   mail=     '-f'+alltrim(orig)+' '
   mail=mail+'-t'+alltrim(dest)+' '
   mail=mail+'-c'+alltrim(cc)+' '
   mail=mail+'-b'+alltrim(cco)+' '
   mail=mail+'-h'+alltrim(serv)+' '
   mail=mail+'-s'+alltrim(assu)+' '
   mail=mail+'-itexto.txt'+' '
   mail=mail+'-a'+alltrim(anex)


   ! smtpsend &mail > nul
   ! del texto.dbf
   ! del texto.txt
   do TELA

enddo

Function CRIAARQ
private aStru
aStru := {;
{"TXT","C",500,00}}
dbcreate("&arqm",aStru)
return nil

Enviado: 25 Dez 2004 12:40
por Dudu_XBase
Augusto Bom Dia !!
Eu executo assim...

v_file= "-fdudutakashi@terra.com.br"+CHR(13)+CHR(10)+;
'-t'+ALLTRIM(LOWER(PARA))+CHR(13)+CHR(10)+;
"-s"+ALLTRIM(ASSUNTO)+CHR(13)+CHR(10)+;
"-luusuario"+CHR(13)+CHR(10)+;
"-lpsenha"+CHR(13)+CHR(10)+;
"-hsmtpdoterra"+CHR(13)+CHR(10)+;
"-imsg.txt"+CHR(13)+CHR(10)+ ;
"-a"+alltrim(ANEXO)+CHR(13)+CHR(10)


nHandle2 := fCreate("E_NVIO.TXT",FC_NORMAL)
fwrite(nHandle2,alltrim(v_file))
fClose(nHandle2)

cMacro="SMTPSEND.exe -@E_NVIO.TXT > VERRO.TXT"
run &cMacro.

No seu Caso tente fazer isso...

cMacro := "smtpsend.exe "+mail+" > null"
Run &cMacro.