Once a code has been assigned to an email address, it can only be redeemed by an edX learner with that particular email address.
If the learner's edX account uses a different email address than the one where they received the code assignment email, they will need to change the email address on their edX account to use the code. Alternatively, the code can be revoked and reassigned to the proper email address.
Once the code has been used, the learner may change the email address in their edX account to any valid email address.