anybody has sample with sending mail ?
kajot
anybody has sample with sending mail ?
See FWH\samples\testmail.prg and testsmtp.prg.
testmail.prg uses MAPI and testsmtp uses SMTP.
James
I test testsmtp, but it does't send my mail.
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
how may I check , if may SMTP server required authorization
my SMTP server: smtp.hot.pl
what I have to setup if may smtp server required authorizatio
Kajot,
You can google for blat.exe. This program is a command line program to send email via SMTP. You can try to send email via your server with this to see if it works. If you can get it working with blat.exe, then maybe you can get it working with FWH.
James
...
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.
...what is variable cf ????
and function FormHtml( cSubject, cBody )
>>what is variable cf ????
-cf <file> : cc receipts list filename
cf ??
this is name file whitch I want to send ?
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) + ["])Kajot,
>cf ??
>this is name file whitch I want to send ?
No this is the name of a text file containing a list of the addresses of recipients that you want the mail to be CC'd (carbon copied) to.
do You have any sample ?
Kajot,
>do You have any sample ?
It is just a list of email addresses.