Adding functionality to email form