Re: Script sending ascii attachment

From: Alan Connor (zzzzzz_at_xxx.invalid)
Date: 07/29/05


Date: Fri, 29 Jul 2005 10:26:46 GMT

On comp.unix.shell, in
<%3nGe.10006$dU3.4117@newsread2.news.pas.earthlink.net>, "Alan
Connor" wrote:

> 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
>

In reference to John L's article: One of the reasons that
mimeencode was developted is because there is no standardization
among uuencode utilities.

AC

-- 
People who post through google take and take and never give
back. Ever seen one of them help anyone? If they are asking
about anything but how to use a real newsreader, PLEASE DON'T
HELP THEM.    ----------->    news.software.readers


Relevant Pages