[REFACTOR] check mail() return status