The file is located under appl/batchdata/
file name: storesales.txt
I am using following code because uuencode is not present. I am not getting the data in file but i am getting the blank file with same name as an email attachment.
( echo "from: sch@xxxx.com"
echo "to:sch@xxxx.com"
echo "subject:Store Sales Feed Commission Report for $TODAYDATE"
echo "mime-version: 1.0"
echo "content-type: multipart/related; boundary=xxxRANDOMSTRINGxxx"
echo
echo "--xxxRANDOMSTRINGxxx"
echo "content-type: text/plain"
echo
echo "Store Sales Feed for the previous day is listed below:"
echo
echo "--xxxRANDOMSTRINGxxx"
cd /appl/batchdata/outgoing/commission/dev/
echo "content-type: text; name=storesales.txt"
echo "content-transfer-encoding: base64"
echo
openssl base64 <mail.success ) | /usr/lib/sendmail -t -i "sch@xxxx.com"
As I recall, you need a mime divider after the base 64 to satisfy that layer. Mime can frame unencoded files, too, 3/4 the length.
Yoda
January 10, 2013, 5:25pm
3
Try this code if you want to send file: storesales.txt
as attachment:
{
echo "From: sch@xxxx.com"
echo "To: sch@xxxx.com"
echo "MIME-Version: 1.0"
echo "Subject: Store Sales Feed Commission Report for $TODAYDATE"
echo 'Content-Type: multipart/mixed; boundary="-q1w2e3r4t5"'
echo "---q1w2e3r4t5"
echo "Content-Type: text/plain"
echo "Content-Disposition: inline"
echo '---q1w2e3r4t5'
echo "Store Sales Feed for the previous day is listed below:"
echo '---q1w2e3r4t5'
cd /appl/batchdata/outgoing/commission/dev/
echo "Content-Type: text/plain; charset=US-ASCII; name=storesales.txt"
echo "Content-Disposition: attachment; filename=storesales.txt"
echo '---q1w2e3r4t5'
cat storesales.txt
echo '---q1w2e3r4t5--'
} | /usr/lib/sendmail -t