Fix codes used in emails