fix transfer to email with test case