Implemented the mail plugin