Fixed duplicate email bug. Added unittest to check ticket submit page.