added mail class which uses phpmailer