Implemented email functionality in activity.