stop send mail when there are no rows