Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2005
    Posts
    23

    Unanswered: Sending mail from shell with attached file

    Hi !

    I want to send an e-mail from a shell command and to be able to attach at least 2 files to it.
    I found mutt, but I need something that will not promt anything that I need to config or complete and I hope that it's possible.

    Thanks in advance,
    Chris

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Note: back quotes used
    Code:
    cat <<EOF | mailx -s "Batch issues" Chris@somehost.com
    `df -k | unix2dos | uuencode file1.txt`
    `unix2dos /tmp/job001.log | uuencode job001.log`
    Attached file1.txt is df -k output
    and job001.log is the batch output 
    
    Regards
    PD
    EOF
    Last edited by pdreyer; 11-18-05 at 02:34.

Posting Permissions

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