improved mailscript