added comments for functions
added mailer capability and web API