Email functionality implemented