mail plugin rewrite AGAIN, now all issues should be tackled