Checking condition inside the loop

Hi all,
I have one clarification i am using the loop which will process for each record .suppose there is f ailure in the first record it need to send mail and process the next .my code:
defcount=`cat <filename>|wc -l`
while [[$cnt -le $defcount ]]
do
if <some condiotion>
then
echo "mail"
fi
done

so if the condition is failed i need to exit the if loop not the entire loop.it should againn go to the starting of loop and process for next record.

Kindly help me out in the issue.

Thanks in advance.

while read line ; do
if condition
fi

done < read_from_file