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

Sending Attachment with mailx

373 views
Skip to first unread message

rcee

unread,
Mar 30, 2006, 1:36:21 AM3/30/06
to
Hi all ,

Can some one help me with the command to sent attachment using mailx .

Is it possible and if it is , is there any limitation of the size ?


Thanks
RC

Hajo Ehlers

unread,
Mar 30, 2006, 3:08:30 AM3/30/06
to

rcee wrote:
> Hi all ,
>
> Can some one help me with the command to sent attachment using mailx .
I assume you mean binary attachments

man uuencode

>
> Is it possible and if it is , is there any limitation of the size ?

After uuencoding you can splitt the file into a size which is supported
by all processes and resources meaning from a technical/theoretical
point of view the file size is almost unlimited.

But who likes to get a 4,5 GB email where its mail directory is on a
2GB limited FS

hth
Hajo

rcee

unread,
Apr 5, 2006, 2:48:04 AM4/5/06
to
Thanks for the reply ,


Ya definetly not in GB's but in MB's. So if the restriction is only for
GB's then it's ok .

So what about ascii files.!

Hajo Ehlers

unread,
Apr 5, 2006, 6:33:01 AM4/5/06
to

rcee wrote:
> Thanks for the reply ,
...

> So what about ascii files.!
Depends what you mean which ascii file.
Only printable ASCII characters ? ( which can be send by smtp without
problems )
The full ascii code set ? ( Even a STRG-V,STRG-M ( ^M) is for mail

So do not care about the file type meaning use uuencode allways. This
way you do not have to care about special characters like ^M (
ctrl-v,ctrl-m ) and the processing atthe receiver side canbe done
automaticly
Thus we go the Unix way and see everything as a data stream .

Sure for short messages i would not use uudecode but i think you are
talking about large files.
hth
Hajo

sol gongola

unread,
Apr 5, 2006, 9:42:44 AM4/5/06
to
If your need an example of sending with an attachment, look at
John Roebucks jail program at http://www.tek-tips.com/faqs.cfm?fid=1843
It is a shell script that handles binary attachments and is
easy to understand and customize/

sol

Message has been deleted

Mark Taylor

unread,
Apr 7, 2006, 4:39:15 AM4/7/06
to
I have played with this quite a bit and there are many many ways to do
so .. one resource I found good was
http://www.panix.com/~kylet/unix-att.html .. my personal favorite is
"mutt -a" tho I have also used uuencode and mail where "mutt" was not
installed ala ..

ATTATCH="file1.txt file2.txt file3.txt"
SUPPORTMAILTO="me@my_domain.com"
MAILTO="you@your_domain.com"
MSG="This is an attahcment test!!!"

fn_sendmail()
{
# Build sendmail header.
echo "From: $SUPPORTMAILTO"
echo "To: $MAILTO"
echo "Subject: ${MSG}"
echo "X-MSMail-Priority: High"
echo "importance: 1"
echo "Mime-Version: 1.0"
echo "Content-Type: text/plain"
echo
echo
echo "Hi, Please find attached ${ATTACH}"
echo
echo

# uuencode the attachments.
for k in ${ATTACH}
do
uuencode $k $k
done

}

fn_sendmail | sendmail -t -oi

HTH
Mark Taylor

0 new messages