Need help in uuencode command

Hi,

I am trying this command.

/usr/bin/uuencode test.xls error.xls | mail -s "Testing" <emailid>

Instead of me having an attachment, i am getting this.

begin 644 error.xls
M1&%T87-T86=E($5R<F]R<PI,2U`S.B!7:&5N(&-H96-K:6YG(&]P97)A=&]R
M.B!/;B!I;G!U="!D871A('-E="`Q.B!4:&4@=FEE=R!A9&%P=&5R(&AA<R!A
M(&)I;F1I;@IG(&9O<B!T:&4@;F]N+65X:7-T96YT(&1E<W1I;F%T:6]N(&9I
M96QD("),3T-!3%]-3T1%3"(N"@I$871A<W1A9V4@17)R;W)S"DQ+4#,Z(%=H
M96X@8VAE8VMI;F<@;W!E<F%T;W(Z($]N(&EN<'5T(&1A=&$@<V5T(#$Z(%1H
M92!V:65W(&%D87!T97(@:&%S(&$@8FEN9&EN"F<@9F]R('1H92!N;VXM97AI
M<W1E;G0@<V]U<F-E(&9I96QD(")"55-)3D534U]53DE47TY!344B+@H*1&%T
M87-T86=E($5R<F]R<PI,2U`S.B!7:&5N(&-H96-K:6YG(&]P97)A=&]R.B!/
M;B!I;G!U="!D871A('-E="`Q.B!4:&4@=FEE=R!A9&%P=&5R(&AA<R!A(&)I

Can somebody help me out.

Cheers!!!!!!

I guess this kind of output is something related to OS. What OS your in..? Try mailx's -a option to send attachment if available

1 Like

@michaelrozar17,, that solved the issue.. :slight_smile:

That looks like a valid uuencoded attachment really. Unfortunately email programs are beginning to forget about the older uuencode method and rely purely on MIME/base64, and just show that garbage when it happens.

is there a way to attach multiple files..????

What's your OS?

mailx -a file1 -a file2 -s "subject" user@domain <message-file

Attaches both files to the mail with what was in message-file sent as the main body. Your mileage might vary, but it seems to work for me.

1 Like

my OS is suse linux 10..