send mail functionality added, minor changes