Thanks!
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
**********************************************************************
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