email security function + ui updates