any sample with sending mail
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Did you edit it with your own SMTP server? You can't use the fivewin SMTP server. If you don't have an SMTP sever, then you can't use this program. Also, I think some SMTP servers require user authentication in which case this program won't work.
There is a third party TSMTP class that has more features. However lots of people have had trouble using both versions. A lot seems to depend on the SMTP server.
James
There is a third party TSMTP class that has more features. However lots of people have had trouble using both versions. A lot seems to depend on the SMTP server.
James
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Friends
Take look this:
The Blat code:
Authentication need your SMTP Server and POP user and password.
Take look this:
Code: Select all
...
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"
...
Code: Select all
...
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.
...
- RAMESHBABU
- Posts: 591
- Joined: Fri Oct 21, 2005 5:54 am
- Location: Secunderabad (T.S), India
- RAMESHBABU
- Posts: 591
- Joined: Fri Oct 21, 2005 5:54 am
- Location: Secunderabad (T.S), India
Code: Select all
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) + ["])
- Ramesh Babu P
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact: