October 17, 2006, 02:44 PM
Jim Dale!mailx with an attachement
I've been using the !mailx command for quite some time. Always the file I send ends up as
the body of the email.
!mailx -s "WORKORDERDETAIL OUT OF BALANCE" jdale@sfchronicle.com < &FNAME
Does anyone know how to use !mailx with an attachement? It will be a PDF file.
Thanks,
Jim
Version 5.33
Unix Solaris
October 17, 2006, 03:22 PM
Francis Marianiquote:
!mailx
is a non-WebFOCUS UNIX command.
Check Google or start here:
http://www.shelldorado.com/articles/mailattachments.html Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 17, 2006, 06:25 PM
N.SelphI have used elm to do this. I wasn't able to figure out how to do it with mailx. I call a Unix script from Webfocus
-SET &UNIXARG=&DEST.&N2 || ' "'|| &FILENAME || '" "' || &SUBJECT || '" "' || &BODY || '"';
-UNIX dclnotice.send &UNIXARG
In the Unix script
MAILTO=$1
ATTACH=$2
SUBJECT=$3
BODY=$4
WRKFILE=dclsend.wrk
echo " $BODY \n " > $WRKFILE
echo "[include $ATTACH application/octet-stream base64 ] " >> $WRKFILE
cat $WRKFILE | elm -s "$SUBJECT" $MAILTO
October 18, 2006, 10:14 AM
TerryWAlso, check out the 'mpack' command. You may have to download the source and compile it if it's not on your machine, but I use it all the time with great results.
October 26, 2006, 02:07 PM
DaleThank you all for your suggestions. Appreciate the help.
I will try them out and see how they work and let you know.
Jim