code optimisation in mail class

- better default params for constructor
- fixed minor bug