Sendmail Script: Gmail cannot find attachments

Hi.

I am using a script on HP-UX to send emails that include a Pdf attachment to clients. The scipt makes use of sendmail.

The scripts works for everything except gmail. When I go on gmail via my Web Browser, I can see the message with the attachment, but if I try to view or download the attachment, gmail tells me that the attachment cannot be found at its original source.

If I use this same script to send the message to my hotmail account or my work email, everything is fine.

Can somebody please help? The script is shown below.

echo "From: ${MAIL_FROM}" > $MSG_FILE
echo "To: ${MAIL_TO}" >> $MSG_FILE
echo "Subject: ${SUBJECT}" >> $MSG_FILE
echo "MIME-Version: 1.0" >> $MSG_FILE
echo 'Content-Type: multipart/mixed; boundary="--_GvXjxJ+pjyke8COw"' >> $MSG_FILE
echo " " >> $MSG_FILE
echo "----_GvXjxJ+pjyke8COw" >> $MSG_FILE
echo "Content-Type: text/plain; charset=ISO-8859-1" >> $MSG_FILE
echo "Content-Disposition: inline" >> $MSG_FILE
echo " " >> $MSG_FILE
cat $BODY_FILE >> $MSG_FILE
echo " " >> $MSG_FILE
echo "----_GvXjxJ+pjyke8COw" >> $MSG_FILE
echo "Content-Type: application/octet-stream" >> $MSG_FILE
echo "Content-Disposition: inline; filename=${ATT_FILE_NAME}" >> $MSG_FILE
echo "Content-transfer-encoding: X-UUencode">>${MSG_FILE}
echo " " >> $MSG_FILE
/usr/bin/uuencode  ${ATT_FILE} ${ATT_FILE} >> ${MSG_FILE}
echo " " >> $MSG_FILE
echo "----_GvXjxJ+pjyke8COw--" >> $MSG_FILE
echo " " >> $MSG_FILE
/usr/lib/sendmail ${MAIL_TO} < ${MSG_FILE};EXITSTATUS=$?

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.

What are the values of these two variables?