Set email sent flag after email is sent