Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MIME encoding on AIX

350 views
Skip to first unread message

Ann Bothwell

unread,
May 6, 1999, 3:00:00 AM5/6/99
to
Does AIX provide a tool for MIME encoding files, similar to the uuencode
utility they currently provide?
I am looking for a tool that I can use from the command line to encode
files, attach them to e-mail messages. and pass the everything off to
'sendmail' for processing. E-mail readers will not work since I will be
using this from within an Informix application and this process needs to
be transparent to the user.

Thanks!


Tim Reed

unread,
May 6, 1999, 3:00:00 AM5/6/99
to Ann Bothwell
Ann,

I was just playing with a script posted by V.Saulis that allows
attachments from the command line. It simply uuencodes the file, then
pipes it to mail. I've tried it with html, gif and pdf files to my main
mail account which I read with Netscape and it works beautifully.

Here it is, use at your own risk:

-----------------------------------------------
#!/bin/sh
#
# Script to send mail with attachments
#
# Created 1999.04.13 by V.Saulis
# 19990506 - Modified by Tim Reed to be more general is use.
#
#
USAGE="\n\nUsage: mail_attach MAILTO ATTACHMENT
\n\n where MAILTO = the email address to send to
\n and ATTACHMENT = the file to attach
\n
\n Optional: Place any message in the file e-mail.txt
\n in the current directory. It will appear
\n before the attachment. You should delete
\n the e-mail.txt file after the message is sent.\n\n\n"
EXTENT=gif
HEADFILE="./e-mail.txt"
SUBJECT="See attachment"
MAILTO="$1"
FFILE="$2"

if [ $# -ne 2 ]
then
echo $USAGE
exit
fi

if [ -r $HEADFILE ]
then
{ cat $HEADFILE; uuencode $FFILE $FFILE; } | mail -s "$SUBJECT"
$MAILTO
else
{ uuencode $FFILE $FFILE; } | mail -s "$SUBJECT" $MAILTO
fi
-----------------------------------------------

Tim
--
**********************************************************************
Tim Reed
UNIX Systems Administrator
rpg...@email.sps.mot.com
**********************************************************************

justin

unread,
May 7, 1999, 3:00:00 AM5/7/99
to
hello ann,
i have had good experience with freeware mpack which attaches any file (incl
all our batch reports) to email thus mpack -s"subject" file email@address
i got it from bull's site in lpp format works well, no drama

In article <7gs6g9$gk1$1...@news.duke.edu>,


Ann Bothwell <both...@duke.edu> wrote:
> Does AIX provide a tool for MIME encoding files, similar to the uuencode
> utility they currently provide?

> I am looking for a tool that I can use from the command line hi anneto encode


> files, attach them to e-mail messages. and pass the everything off to
> 'sendmail' for processing. E-mail readers will not work since I will be
> using this from within an Informix application and this process needs to
> be transparent to the user.
>
> Thanks!
>
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Carlos da Cunha e Silva

unread,
May 10, 1999, 3:00:00 AM5/10/99
to Ann Bothwell
Try mpack ! This is a utility to attach files to mail and send them


0 new messages