Unable to send a mail

Hi,

I have been trying to send a mail from a remote site using this script

To send the mail:
#!/bin/ksh
MAILTO="abc@xyz.com"
BACKUPDIR="/wls_domains/wli81_1/RHTEAM/OUTPUTBACKUP/"
#BACKUPDIR="../OUTPUTBACKUP/"
while [ $# -ge 1 ]; do
print $1
uuencode $1 $1 | mail $MAILTO
print "Mail sent with $1 attached"
cp $1 $BACKUPDIR
rm $1
shift
done

To get one attachment per mail:
#!/bin/ksh
OUTPUTDIR="/wls_domains/wli81_1/RHTEAM/OUTPUT"
#OUTPUTDIR="../OUTPUT"
cd $OUTPUTDIR
while [ 1 ]; do
ls *.CSV | xargs "/wls_domains/wli81_1/RHTEAM/Script/sendMailAttach.ksh"
sleep 300
done

The main script:
#!/bin/ksh
./mailCSV.ksh &

There is no error being prompted and neither the mail is being delivered. Could anyone help me with this? I am not able to get the error in any of the scripts.

What output does it produce? You see no errors but do you see the "mail sent with XXX attached" messages?

What do the local mail logs say? Is the mail sending but the address getting garbled or is it not even getting to the local spooler?

I am not able to see any error whatsoever...do u think i need to configure the SMTP server?

If you get no output at all, then the lines in your script that print out what it's up to are not getting run. That means you have a problem far earlier on in your execution than when it's talking to the SMTP server.
Change the #!/bin/ksh line to #!/bin/ksh -x, rerun it and post the output.
While your at it, edit your original post and add CODE tags so it's easier to read.