We've been emailing uuencode'd PDF files as attachments with mailx for quite sometime with no problems. Recently we've expanded the volume and have intermittent problems with recipients unable to open the attachment. The same file can be successfully resent at a different time.
It's been suggested we move from basic uuencode to MIME/Base64. To accomplish that we added "-m" to uuencode. The file is Base64 encoded, but rather than being an attachment to the message, it's in the body of the message as the encoded text which of course is not acceptable.
This sends the email with the PDF file as an attachment
SUBJ=$1
SENDTO=$2
ATTACH=$3
BODY="$( cat mailit.txt )"
baseName=$( basename $ATTACH )
(echo "$BODY"; uuencode $baseName $ATTACH) | mailx -s "${SUBJ}" -inN -r "$SEMAIL" "$SENDTO"
This puts the encoded text into the body of the message
SUBJ=$1
SENDTO=$2
ATTACH=$3
BODY="$( cat mailit.txt )"
baseName=$( basename $ATTACH )
(echo "$BODY"; uuencode -m $baseName $ATTACH) | mailx -s "${SUBJ}" -inN -r "$SEMAIL" "$SENDTO"
Any suggested remedies would be MUCH appreciated.
TIA
Lee Carlson