email functions added.