ot: mail flag for attachment in unix

Dennis Malen dmalen at malen.com
Wed Sep 30 18:42:13 PDT 2009


Here's the last conundrum. What I now wanted to do was to send a script that 
attaches a file to the email and also writes a message in the body of the 
email.

I attempted to use:

uuencode /tmp/emccx.xls emcc.xls | mail -s "test3" dmalen at malen.com <tryftp

If I use the right side of the pipe separately it places the contents of 
"tryftp" in the body. If I use the full line without the "<tryfile" it 
attaches "emcc.xls" to the email.

When I try the entire line above, the right side of the pipe wins and just 
places the contents of "tryftp" in the body of the email without any 
attachment.

Am I precluded from combining the two sides in UNIX this script or anything 
like it?

Dennis Malen
516.479.5912
----- Original Message ----- 
From: "Bill Campbell" <bill at celestial.com>
To: <filepro-list at lists.celestial.com>
Sent: Wednesday, September 30, 2009 2:32 PM
Subject: Re: ot: mail flag for attachment in unix


> On Wed, Sep 30, 2009, Kenneth Brody wrote:
>>Dennis Malen wrote:
>>> Thanks for the responses. AIX did not have mutt. The following did work 
>>> as suggested by Scott:
>>>
>>> uuencode test.txt test.txt|mail -s "Attach a file" email at email.com
>>>
>>> Fairlight suggested that uuencode may be a problem. Is uuencode unstable 
>>> and something I should not rely on? And if so, is there anything else I 
>>> should use.
>>>
>>> In the meantime I will use uuencode.
>>
>>I didn't see anything in Fairlight's e-mail that said uuencode may be a
>>"problem".  Rather, he pointed out that the method above is _not_ creating
>>an attachment, but rather "inline embedding", and that not all e-mail
>>clients nowadays will recognize embedded uuencoded text.  (Instead, you'll
>>simply see a bunch of "garbage" in the message body.)
>
> As I remember, and it's been a long time since I looked at this,
> uuencode may have issues encoding/decoding some things.  Google
> will probably find the answers to this.
>
> It's also been a long time since I did any serious work on AIX
> and had access to any AIX systems to see what's available.  If it
> has perl or python, then there are fairly easy ways to create
> scripts to do what you want.  I could put something together in
> python pretty quickly.  Perl would take a bit longer as I haven't
> done much perl in about 4 years after using it for most of my
> development since 1989 or so.  Mark/Fairlite is much more current
> in perl than I these days.
>
> Bill
> -- 
> INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
> URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
> Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
> Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792
>
> Never chastise a Windows user...just smile at them kindly as you would a
> disadvantaged child. WBM
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list 



More information about the Filepro-list mailing list