don't send mail if no body is there
remove debug print statement
improve code doc