First off, that snippet isn't going to work in the huge majority of systems: it doesn't include any authorisation, which most email systems require to prevent me spoofing your id in messages.
Have a look here:
Sending an Email in C# with or without attachments: generic routine.[
^] - it's the code I use.
The second problem is the one you describe, and we can't answer that: We can't tell you "what goes here?" because there is nothing in your code which even tries to store email addresses against an integer id value - so we can't begin to work out how you would go backwards.
In addition, the ContactDetail class does not directly link to the ContatcDetailEmail class that you refer to in the main body of the code - it can't be derived from it, as each email contact would then have it's own separate list or contacts, which is just plain silly.
I think you need to sit down, look at what you are trying to achieve, and work back from there. Unless you add an ID value to your ContactDetailEmail so you have a unique value to refer to across teh whole system, you can't do anything like the look up you are after. (BTW: I wouldn't use an int for this myself - it's a PITA organising them and deciding which is the "next" free value - consider using a GUID instead - I do!)