If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Sending mail from shell with attached file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-17-05, 10:05
loopoo loopoo is offline
Registered User
 
Join Date: Aug 2005
Posts: 23
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
Reply With Quote
  #2 (permalink)  
Old 11-18-05, 01:31
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,268
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 01:34.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On