No subject


Thu Apr 19 13:57:37 EDT 2007


Below is a sample script I've used that may help in getting you
started.

#!/bin/sh
#
# script to package a file into a mime entry for mailing
# FGF 2001.03.14
#
#!/bin/sh
#
# script to package a file into a mime entry for mailing
# FGF 2001.03.14
#
PATH=/usr/bin
file=sample.txt
tmp=/tmp/mime.$$
sender=sendaddr at domain.your.net 
sname="Lastname, Firstname"
replyto=support at domain.your.net 
recipient=recaddr at whereever.net 
subj="Sample File"
date=`date +"%a, %d %b %Y %H:%M:%S -0500"`

echo "From: \"$sname\" <$sender>" > $tmp
echo "To: \"$recipient\" <$recipient>" >> $tmp
echo "Subject: $subj" >> $tmp
echo "Date: $date" >> $tmp
cat << EOF1 >> $tmp
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: multipart/mixed;
        boundary="----_=_NextPart_000_01C09C08.5CE58FD6"

------_=_NextPart_000_01C09C08.5CE58FD6
Content-Type: text/plain;
        charset="iso-8859-1"

------_=_NextPart_000_01C09C08.5CE58FD6
Content-Type: text/plain;
        name="sample.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
        filename="sample.txt"

EOF1

cat $file >> $tmp
-------------------------------------------------------------------------------
Charles Homan:

The general way I did it was to uuencode my attachments and output them
all
to a temp file.  I then used mailx to send it with input from my temp
file.

-------------------------------------------------------------------------------


More information about the summaries mailing list