[ale] using uuencode to create a viewable email attachment

James Sumners james.sumners at gmail.com
Sat Jan 16 17:18:07 EST 2010


Give this a shot (adapting as necessary):

#!/bin/bash
# *snip*
/usr/bin/uuencode /tmp/${x}.zip ${x}.zip > /tmp/zipmail.attach
cat /home/user/${x} /tmp/zipmail.attach > /tmp/zipmail.eml
/usr/bin/mailx -s "${subject}" -r "${from}" -c "${carboncopy}" -b
"${bcc}" "${to}" < /tmp/zipmail.eml
# *snip*

On Sat, Jan 16, 2010 at 2:29 PM, Brian W. Neu <ale at advancedopen.com> wrote:
> so I tried
>
> uuencode tester.sh tester.sh |mail -s "mail test" my at email.com
>            &
> uuencode -m tester.sh tester.sh |mail -s "mail base64 test" my at email.com
>
> Both open in Thunderbird as content of the email body and not an
> attachment such as:
>
> begin-base64 750 tester
> IyEvYmluL2Jhc2gKIy91c3IvbG9jYWwvYmluL3JzeW5jIC1hTkhBWHggLS1wcm90ZWN0LWFyZ3Mg
> LS1maWxlZmxhZ3MgLS1mb3JjZS1jaGFuZ2UgLS1yc3luYy1wYXRoPSIvdXNyL2xvY2FsL2Jpbi9y
> -blah,blah,blah-
>
>
> I've tried mailx, and using echo prior to the uuencode out put, but the uuencoding still displays as the message body and not an attachment.
>
> Any suggestions?
>
> Oh, this is on an OS 10.5 iMac ;-) , but I have shown identical results on F12.



-- 
James Sumners
http://james.roomfullofmirrors.com/

"All governments suffer a recurring problem: Power attracts
pathological personalities. It is not that power corrupts but that it
is magnetic to the corruptible. Such people have a tendency to become
drunk on violence, a condition to which they are quickly addicted."

Missionaria Protectiva, Text QIV (decto)
CH:D 59



More information about the Ale mailing list