Improvements in send_mass_mail_wrapper function