Sending attachmeng using uuencode
Hai all,
RHEL AS 4 am using the below code to send attachment [code] cat mail_body;uuencode MED_HEALTHCHECKUP.OUT MED_HEALTHCHECKUP.OUT )|mailx -s "INVALID OBJECTS REPORT FOR $DATE_SUFFIX" knehealthcheck@gmail.com & [code] and it is failing with the below error [code] uuencode: command not found [code] I tried installing sharutils rpm as below [code] warning: sharutils-4.6.1-2.ia64.rpm: V3 DSA signature: NOKEY, key ID 1d1e034b error: Failed dependencies: rtld(GNU_HASH) is needed by sharutils-4.6.1-2.ia64 [code] How I can fix this ?. if not, is there any other alternative other than uuencode as I also don't have mutt installed Please advise Kai |
Have you considered saving yourself the trouble, and using mutt?
Code:
mutt -a MED_HEALTHCHECKUP.OUT -s "INVALID OBJECTS REPORT FOR $DATE_SUFFIX" knehealthcheck@gmail.com < mail_body Cheers, Tink |
Use mutt(1). It gets you MIME-compliance. Uuencoding attachments has arguably been superseded at this stage of the game.
P.S. RHEL4 support ended a couple weeks ago. |
sendmail with attachment s
Dear all,
RHEL AS 4 am using the below code to send email as attachement [code] ALERTDIR=/reports/final ALRMSG_SAM=$ALERTDIR/HEALTHCHECKUP.out if [ -f $ALRMSG_SAM ] then rm $ALRMSG_SAM fi if test -s $ALRMSG_SAM then /usr/sbin/sendmail -t <<EOF From: ERP-Production Server To: testit@gmail.com Subject: Health Check Report Content-Type: html content-disposition: attachment; filename=HEALTHCHECKUP.out EOF fi [code] This doesn't work and doesn't write in /var/log/mail too. but when am using the send mail in command line like [code] df -h | sendmail "testit@gmail.com' [code] works fine ? Any idea ? Kai |
Quote:
probably you are using BASH, so the first thing in script should define which environment uses, like: Code:
#!/bin/bash Code:
if test -s "$ALRMSG_SAM" Code:
if test -s $ALRMSG_SAM good luck |
Merged the two closely related threads. Please keep your discussions in one spot.
|
All times are GMT -5. The time now is 08:00 PM. |