Focal Point
!mailx with an attachement

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4011054191

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 Mariani
quote:
!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.Selph
I 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



(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
October 18, 2006, 10:14 AM
TerryW
Also, 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
Dale
Thank you all for your suggestions. Appreciate the help.

I will try them out and see how they work and let you know.

Jim


My site:
WebFocus 5.33
Unix Solaris 5.8
DataBase - Oracle 9i2