modified set_mail_production