Using ColdFusion To Get The Members Of An MS Exchange Distribution List
November 13th, 2007
The easiest way to get the members of a MS Exchange distribution list is to query your MS Active Directory Server using standard LDAP technology. This can be accomplish with using ColdFusion’s CFLDAP tag & a relatively simple LDAP query. It a little challenging, because you probably have to be somewhat familiar with your LDAP server’s schema. The following is an example of how I do it.
<cfldap action="QUERY">
name="results"
attributes="memberof,sn,dn,dc,cn,mail"
start="dc=yourdomain,dc=com"
server="yourLDAPserver.com"
username="yourdomain\yourusername"
password="yoursecretpassword"
filter="(&(memberof=CN=Your_Distribution_Group,OU=Distribution Groups,DC=yourdomain,DC=com))"
</cfldap>
<cfdump var="#results#"></cfdump>
References
http://www.cfmcentral.com/forum/details.cfm?ID=1761&forumtype=1
http://www.adobe.com/devnet/server_archive/articles/integrating_cf_apps_w_ms_active_directory.html