Set email sent flag after email is sent

Store emailSent flag into the order.