Linux using the SENDMAIL script?

Linux using the SENDMAIL script?

Postby MGA » Tue Dec 23, 2008 9:59 am

Anybody know how to send email on Linux using the SENDMAIL script?
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: Linux using the SENDMAIL script?

Postby Davide » Wed Dec 31, 2008 12:21 pm

******************************************************************
Function SendMail(cNameFrom,cFrom,cNameTo,cTo,cBcc,cSubject,cText)
******************************************************************
Local cTxt
If Empty(cNameFrom) ; cNameFrom:="" ; Endif
If Empty(cFrom) ; cFrom :="info@you.com" ; Endif
If Empty(cNameTo) ; cNameTo :="" ; Endif
If Empty(cTo) ; cTo :="info@you.com" ; Endif // It should never happen
If Empty(cBcc) ; cBcc :="" ; Endif
If Empty(cText) ; cText :="" ; Endif
If Empty(cSubject) ; cSubject :="Request from "+HB_ARGV(0) ; Endif
cTxt:="From: "+chr(34)+cNameFrom+chr(34)+" <"+cFrom+">"+chr(10)+;
"To: "+chr(34)+cNameto+chr(34)+" <"+cTo+">"+chr(10)+;
"Subject: "+cSubject+chr(10)+chr(10)+cText
cTxt:=StrTran(cTxt,"'",chr(96))
cTxt:="echo '"+cTxt+"' | /usr/sbin/sendmail -f "+cFrom+" "+cTo+" "+cBcc
RUN ( cTxt )
Return cTxT
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 99 guests