Sending HTML attachment through mail

Hi
I am new to unix and scripting.I am trying to send a html file as an attachment.
SUBJECT="Type of Exceptions in Application"
TO=Sushovan.Samals@gmail.com
SPOOLFILE=/data/reg/tlogs/Monitor.html
#echo "Send the E-mail message..."
uuencode $SPOOLFILE $SPOOLFILE | mailx -s "$SUBJECT" $TO

But the message i am getting contains text which are garbled.I donot have the permission to use sendmail option(i think so as it is command not found for the path).
So how to send a mail containing html attachment.Please suggest.Thanks in advance.

Regards
-S

Try to tar or compress the file and check if the output is still garbled. Or you might try to send a simple file which contains just some simple characters like "hello here i am".
With what tool did you check the attachment?
If you receive the mail on unix, you might use a tool like munpack or mail client that is able to separate the attachment from the mail text.

Hi
Thanks for responding.
I am not getting the attachment,instead its appearing in the message body itself.Its coming like this:

begin 644 /tmp/scripthtml

  • Hide quoted text -
    M"CPA1$]#5%E012!(5$U,(%!50DQ)0R B+2\O5S-#+R]$5$0@2%1-3" T+C @
    M5%)!3E-)5$E/3D%,+R]%3B(^( H)/$A434P@3$%.1STB14XB/CQ(14%$/CQ4
    M251,13Y%>&-E<'1I;VX@4W1A='5S/"]4251,13X\+TA%040^"CQ"3T19(&%L
    M:6YK/2(C,# V-F9F(B!B9V-O;&]R/2(C,# P,# P(B!L:6YK/2(C,# P,&9F
    M(B!T97AT/2(C8V-D9&5E(B!V;&EN:STB(S P,S-F9B(^"CQ#14Y415(^/$@Q
    M/@I$35-E<G9E<@H\+T@Q/D=E;F5R871E9"!O;B!$35-E<G9E<B!!<'!L:6-A
    M=&EO;CPO0T5.5$52/@H*/%1!0DQ%(%=)1%1(/3$P,"4@0D]21$52/3(@0D]2
    M1$520T],3U(](B,P,# P.# B($-%3$Q0041$24Y'/30@0T5,3%-004-)3D<]
    M,CX*(" @(" \5%(@5D%,24=./51/4#X*(" @(" \5$0@5TE$5$@]-S4E($)'
    M0T],3U(](B,P,#DY9F8B/@H@(" @5&]T86P@;G5M8F5R(&]F($5X8V5P=&EO
    M;G,@:6X@9&TM;W)I9VEN+G1X= H@(" @(#PO5$0^"B @(" \5$0@5TE$5$@]
    M,C4E($)'0T],3U(](B,P,#DY9F8B/@H@(" @(# (" @(#PO5$0^"B @(#PO
    M5%(^"B @(#Q44B!604Q)1TX]5$]0/@H@(" @(#Q41"!724142#TW-24@0D=#
    M3TQ/4CTB(S P.3EF9B(^"B @("!4;W1A;"!N=6UB97(@;V8@17)R;W)S(&EN
    M(&1M+6]R:6=I;BYT>'0
    (" @(" \+U1$/@H@(" @/%1$(%=)1%1(/3(U)2!"
    M1T-/3$]2/2(C,# Y.69F(CX*(" @(" P"B @(" \+U1$/@H@(" \+U12/@H@
    =(#PO5$%"3$4^"@H*/"]"3T19/@H\+TA434P^"@H\

Regards
-S