#### ExchGetId

##### ExchGetId (address)

This function will begin by determining whether the address is in X500 or X400 format. Once this has been ascertained, the function will then determine the ID.

- If the field is in X500 format, the function will extract the last instance of the "CN=" code (not case sensitive)
- If the field is in the X400 format, it will extract the SMTP or MS Ids.

Note: The fields must follow the address type standards for the functions to operate them.

Parameter

address - The address of sender/recipient (String data type).

Return value

String value.

Examples

- `ExchGetID("/o=Jinfonet Software/ou=JREPORT /cn=Configuration/cn=Servers/cn=ESPRESSO/cn=Fredt")` - Returns "Fredt".
- `ExchGetID("c=US ;a= ;p=Jinfonet; o=apps-wga; dda:smtp=Jenny@jinfonet.com")` - Returns "Jenny@jinfonet.com".
- `ExchGetID("c=US; a= ;p=Jinfonet;o=apps-wga;dda:ms=com/jreport/Jenny")` - Returns "com/jreport/Jenny".