Re: Script sending ascii attachment
From: Alan Connor (zzzzzz_at_xxx.invalid)
Date: 07/29/05
- Next message: joe_at_invalid.address: "Re: How to get files in subdir with spaces"
- Previous message: John L: "Re: Script sending ascii attachment"
- In reply to: Dale DeRemer: "Script sending ascii attachment"
- Next in thread: Alan Connor: "Re: Script sending ascii attachment"
- Reply: Alan Connor: "Re: Script sending ascii attachment"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 29 Jul 2005 09:57:15 GMT
On comp.unix.shell, in <dcbejo$rfd$1@malgudi.oar.net>, "Dale
DeRemer" wrote:
> I need to send an ascii file as an email attachement to
> someone we work with. I need to be able to script this email
> for sending at off hours. The recipient has stringent
> requirements, (lack of ability?). Anyway, I found on Heiner's
> page how to send a uuencoded file as an attachement. uuencode
> file file | mailx -s "Subject" recipient@xyz.com
>
> But, uuencoded files seem to take out the <cr>. Anyone know
> a command line way to send an ascii file, unaltered, as an
> attachment?
>
>
You are kind of vague above. If the file is ascii to begin
with, you don't need to uuencode it. But if it isn't:
I'd suggest using the mimencode utility rather than uuencode.
mimencode inputfile -o outputfile_name
Note that the above script of yours does _not_ result in an
"attached" file. For an attachment you need specific headers and
a boundary designator in the body.
I'd suggest using a modern mail client like mutt:
mutt -s "Subject" recipient@xyz.com -a file
It automatically mimencodes the file (if it isn't just plain text
to begin with) and creates the proper headers and such.
AC
- Next message: joe_at_invalid.address: "Re: How to get files in subdir with spaces"
- Previous message: John L: "Re: Script sending ascii attachment"
- In reply to: Dale DeRemer: "Script sending ascii attachment"
- Next in thread: Alan Connor: "Re: Script sending ascii attachment"
- Reply: Alan Connor: "Re: Script sending ascii attachment"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|