Toggle navigation
Koozali.org: home of the SME Server
Community
Forums
Bugs
Lists
Forum Help
Download
SME Server ISOs
Contribs
Documentation
Manual
Wiki
FAQ
HowTo
Donate
Search
Login
Register
Login
Register
×
Close
Login
Remember me
Koozali.org: home of the SME Server
Legacy Forums
Experienced User Forum
Topic:
command(s) to mail a file??
« previous
next »
+
Print
Pages: [
1
]
Go Down
command(s) to mail a file??
4 Replies
414 Views
Rob Wellesley
command(s) to mail a file??
«
on:
August 26, 2002, 12:44:00 PM »
Hi
I want to have cron mail a log file to an external address
any ideas?
Logged
Curly
Re: command(s) to mail a file??
«
Reply #1 on:
August 26, 2002, 02:15:50 PM »
cat
| mailx -s "subject" user@machine
Logged
Rob Wellesley
Re: command(s) to mail a file??
«
Reply #2 on:
August 26, 2002, 04:36:40 PM »
Curly wrote:
>
> cat
| mail -s "subject" user@machine
Thanks, but cat is not what I need here, it would have to go as an attachment when the file is zipped or a binary.
But thanks for your effort
rob
Logged
Julie Random
Re: command(s) to mail a file??
«
Reply #3 on:
August 26, 2002, 05:11:11 PM »
#!/bin/sh
FN=date +%Y%m%d.csv
ftp -n <open host
cd /pub/.....
get $FN
quit
!
mail me@work < $FN
You should be able to modify the above to suit.
Get the shell to build the commands for you.
I've used this to get the shell to download a file and
then mail it to me.
Logged
Nathan Fowler
Re: command(s) to mail a file??
«
Reply #4 on:
August 26, 2002, 07:18:14 PM »
There is a much easier way
uuencode local_filename filename_to_use_as_attachment | mail -s "Subject Line" user@domain.com
Thanks,
Nathan
Logged
+
Print
Pages: [
1
]
Go Up
« previous
next »
Koozali.org: home of the SME Server
Legacy Forums
Experienced User Forum
Topic:
command(s) to mail a file??