fixed mail state check