Topic
1 reply Latest Post - ‏2006-08-16T21:01:41Z by SystemAdmin
SystemAdmin
SystemAdmin
232 Posts
ACCEPTED ANSWER

Pinned topic newbie script questions

‏2006-08-06T15:20:28Z |
I found this piece of script and am trying to use it to email a log file each day.

  1. bug fix, we can't send email with attachment if mutt is not installed
which mutt > /dev/null
if $? -eq 0 ; then
# now mail backup file with this attachment
mutt -s "$MSUB" -a "$MATT" $MTO < $MES
else
echo "Command mutt not found, cannot send an email with attachment"
fi

However on me Suse Linux Enterprise Server 9 system, mutt seems to go into interactive mode and I must press return for it to process each field.

Is there something I need to do/edit to make mutt work automatically?
Updated on 2006-08-16T21:01:41Z at 2006-08-16T21:01:41Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    232 Posts
    ACCEPTED ANSWER

    Re: newbie script questions

    ‏2006-08-16T21:01:41Z  in response to SystemAdmin

    Other options open to you include....
    elm -s"$SUBJECT" -A $ATTFILE $MAILTO < $TXTFILE

    uuenview -m $MAILTO -b -a $ATTFILE < $TXTFILE

    nail -s "$SUBJECT" -a $ATTFILE $MAILTO < $TXTFILE

    uuencode $ATTFILE $ATTFILE | mail -s "$SUBJECT" $MAILTO

    (uuencode $FILE1 $FILE1; uuencode $FILE2 $FILE2) | mail -s "$SUBJECT" $MAILTO

    of course mutt...which you have trouble with..

    mutt -a $ATTFILE -s "$SUBJECT" $MAILTO < $TXTFILE

    also..... in your .muttrc file, make SURE you have a line :

    set from="youremailaddresshere@youremailprovider.com"