starts email functionality