removed unnecessary function in batch_mail