updated mail script