do not dinamically define/undefine send_mail

define it in common script on demand