[Sunhelp] binary mail attachments through commandline

Wes Hofmann whofmann at yahoo.com
Fri Nov 12 18:36:55 CST 1999


That's sort of true.  You can't do a MIME attachment with mail or mailx, but
you can attach a binary file using uuencode.  If you do this, you can use
uudecode to extract the binary on a unix box or use outlook on a windows box
(to my knowledge, most mail programs understand uuencode).  let's say you
have a file in the current directory named data.bin and you'd like to send
it to someone via mail: (the following should be typed on one line)

(echo "This text will appear in the body of the message"; uuencode data.bin
data.bin) | mailx -s "here is the subject" -cc
"cc.this.person at somewhere.com" "to.this.person at someplace.net

For more info, see the man page for uuencode and mailx.  Hope this helps!

Wes Hofmann



> Hi,
>
> As part of a script, I want to mail a binary file as
> attachment. I have
> solaris 2.6
>
> I understand that I can't do this with mail, mailx. Pls suggest a
> solution.
>
> Thanks in advance.
>
> -Sampath
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
>


__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com







More information about the SunHELP mailing list