Ok, I have read so many threads here but still can't figure out what I am doing wrong.
When I type the following on the Unix prompt it works perfectly fine.
uuencode attach.txt attach..html | mail -s "My Subject"
me@somewhere.com
But if I put it in a file like below and execute it:-
------------------------------------------------------------------------
#!/bin/ksh
uuencode attach.txt attach..html | mail -s "My Subject"
me@somewhere.com
------------------------------------------------------------------------
The attachment comes inside the body of the email unreadable like below:
begin 660 attach..html
M/'!R93X*1413(%)E;&%T:6]N86P@0V]N=F5R<VEO;B!5=&EL:71Y("T@5F5R
M<VEO;B!6,2XR"@IE9'-R8V]N=B!(87,@<W1A<G1E9#H@5&AU($UA<B @,2 Q
M.#HP-3HQ-2 R,# W"B */CX^($DP,#H@26YI=&EA;&EZ871I;VX@0V]M<&QE
M=&4@/#P\"CX^/B!),#$Z(%1/5$%,($-/3E9%4E-)3TX@4D5#3U)$4R!214%$
M.B R.#0Y-2 \/#P*/CX^($DP,CH@5$]404P@4D]74R!74DE45$5.(%1/(%1!
Any help is appreciated.
Thanks.