code:
function OnEvent_ChatWndReceiveMessage(oChatWnd, sOrigin, sMessage, nMessageKind) {
for (var oContact = new Enumerator(oChatWnd.Contacts); !oContact.atEnd(); oContact.moveNext()) {
if (oContact.item().Name === sOrigin) Debug.Trace(oContact.item().Email);
}
}
This certainly isn't the best way and there are many others on the forum.