Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    143

    Unanswered: unable to email with attachment

    I am on SunOS 5.8

    My shell script creates 2 files, one called TSummary.lst and the other one identified by $LOG_FILE

    I am trying to send me an email (email-ids are listed in email_lst.txt) with the TSummary.lst as an attachement & the LOG_FILE printed as the contents of the same email.

    I get the email with the contents of the $LOG_FILE but not getting the attachment.

    Here is what I am doing :

    cat /path/email_lst.txt | while read Line
    do
    (uuencode ${LOGDIR}/TSummary.lst) | \
    mailx -r "T Summary" -s "Summary Notification" $Line < $LOG_FILE
    done
    exit 0

    Where am I going wrong?

    Thanks

  2. #2
    Join Date
    Feb 2004
    Posts
    143
    I found the problem...the below works...

    cat /data/dev/ins/dbi/vpaspr/email_lst.txt | while read Line
    do
    (cat $LOG_FILE;uuencode ${LOGDIR}/TSummary.lst ${LOGDIR}/TSummary.lst) | \
    mailx -r "T Summary" -s "Summary Notification" $Line
    done
    exit 0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •