working mail listener (v2)