fixed mail handling