added email functions to gui