Replicate ToField Domain Smartness

What is so special about the To/CC/BCC fields, that when i press F9, they get the correct @domains of the people i want to email?

I want to reproduce that functionality on another database, another field, but i couldn’t find so far where is it that the field logic goes.

@OptimizeMailAddress(EnterSendTo)

Is obviously not.

Any ideas?