Click to See Complete Forum and Search --> : Howto mail a file using a command line


nemesiox
03-01-2001, 01:12 AM
I've written a simple script to tar a few files everyday. Now I need to to know how to mail it automatically to my e-mail addy.

thanks...

f'lar
03-01-2001, 01:27 AM
hehe: the fun way:
telnet <your mail server here> 25
HELO <name of your local dns server here>
MAIL FROM: <whoever you want the mail to be from. go on pick somebody>
RCPT TO: <destination address>
DATA
<your message here. okay you have to type it all out VERY carefully. so what, it's fun. put a . on a line by itself to quit>
QUIT

:D

[ 01 March 2001: Message edited by: f'lar ]

Strike
03-01-2001, 03:41 AM
f'lar, that's not a real easy way to attach stuff...

I forget how, but there is a way to do it with mail

nemesiox
03-01-2001, 11:08 AM
Well I figure it out... I couldn't do it using mail so I used mutt..

I wanted to e-mail the content of foo.doc with foo.tar.gz file attach to it.

$ cat foo.doc | mutt -s 'foo' -a foo.tar.gz -b anyone@any.com

read man mutt for more info...

thanks....