mail functionality added