Hi,
i want color effect on mail as well as multiple attachment.I have code but this code is used for single attachment. I am unable to attach more than one file.:wall:
I want to send two attachments -ahmed.csv and ahmed1.csv .
Sample content:
<html>
<body>
<b> Hi...</b>
</body>
</html>
Final code:
#!/usr/bin/ksh
DIR=/appldata/download/mail
export MAILTO="abc@xyz.com"
export SUBJECT="Report"
export BODY="$DIR/sample.html"
export ATTACH="$DIR/ahmed.csv"
export ATTACH1="$DIR/ahmed1.csv"
(
echo "To: $MAILTO"
echo "Subject: $SUBJECT"
echo "MIME-Version: 1.0"
echo 'Content-Type: multipart/mixed; boundary="-bon"'
echo
echo '---BON'
echo "Content-Type: text/html"
echo "Content-Disposition: inline"
cat $BODY
echo '---BON'
echo 'Content-Type: application; name="'$(basename $ATTACH)'"'
echo "Content-Transfer-Encoding: base64"
echo 'Content-Disposition: attachment; filename="'$(basename $ATTACH)'"'
uuencode --base64 $ATTACH $(basename $ATTACH)
echo '---BON--'
) | /usr/sbin/sendmail $MAILTO