-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Eric,
The following works for exchange 5.5. Be sure that the mail admin
has ldap enabled...
Enjoy
Mike
<cfparam NAME="attributes.empFirstName" DEFAULT="">
<cfparam NAME="attributes.empLastName" DEFAULT="">
<cfparam NAME="attributes.empDepartment" DEFAULT="">
<cfparam NAME="attributes.empTitle" DEFAULT="">
<cfparam NAME="attributes.qryString" DEFAULT="">
<cfif attributes.sr EQ 0>
<!--- clean up dirty data --->
<cfset attributes.sr = 1>
<cfif len(attributes.empFirstName) is not 0>
<cfset attributes.empFirstName = Trim(attributes.empFirstName)>
<cfset attributes.qryString =
"(givenName=#attributes.empFirstName#*)">
</cfif>
<cfif len(attributes.empLastName) is not 0>
<cfset attributes.empLastName = Trim(attributes.empLastName)>
<cfset attributes.qryString = attributes.qryString &
"(sn=#attributes.empLastName#*)">
</cfif>
<cfif len(attributes.empDepartment) is not 0>
<cfset attributes.empDepartment =
Trim(attributes.empDepartment)>
<cfset attributes.qryString = attributes.qryString &
"(department=#attributes.empDepartment#*)">
</cfif>
<cfif len(attributes.empTitle) is not 0>
<cfset attributes.empTitle = Trim(attributes.empTitle)>
<cfset attributes.qryString = attributes.qryString &
"(title=#attributes.empTitle#*)">
</cfif>
<cfif ListLen(attributes.qryString, "=") GT 1>
<cfset attributes.qryString = "(&" & attributes.qryString &
")">
</cfif>
<cfldap action="QUERY"
name="GetEmployees"
attributes="givenName, sn, department, title,
telephoneNumber"
start="c=us"
scope="SUBTREE"
startrow="1"
maxrows="300"
filter="#attributes.qryString#"
sort="sn"
server="#attributes.LDAPserver#">
<cfset attributes.empData = ArrayNew( 1 )>
<cfloop query="GetEmployees">
<!--- Attempt to filter out resources that are not people --->
<cfif (Len(#givenName#) GT 0) and (Len(#sn#) GT 0)>
<cfif len(#department#) EQ 0>
<cfset tdept = "None on File">
<cfelse>
<cfset tdept = #department#>
</cfif>
<cfif len(#title#) EQ 0>
<cfset ttitle = "None on File">
<cfelse>
<cfset ttitle = #title#>
</cfif>
<cfif len(#telephoneNumber#) EQ 0>
<cfset tphone = "None on File">
<cfelse>
<cfset tphone = #telephoneNumber#>
</cfif>
<cfset tStr = "#givenName#*#sn#*#tdept#*#ttitle#*#tphone#">
<cfset junk = ArrayAppend(attributes.empData, "#tStr#")>
</cfif>
</cfloop>
<!--- Using wddx and client storage is easier that passing stuff on
urls --->
<cfwddx action="CFML2WDDX" input="#attributes.empData#"
output="client.empData">
<!--- Lets do likewise for the search criteria --->
<cfset attributes.empsearch = arraynew(1)>
<cfset junk =
ArrayAppend(attributes.empsearch,"#attributes.empFirstName#")>
<cfset junk =
ArrayAppend(attributes.empsearch,"#attributes.empLastName#")>
<cfset junk =
ArrayAppend(attributes.empsearch,"#attributes.empDepartment#")>
<cfset junk =
ArrayAppend(attributes.empsearch,"#attributes.empTitle#")>
<cfwddx action="CFML2WDDX" input="#attributes.empsearch#"
output="client.search">
</cfif>
- -----Original Message-----
From: Eric Fickes [SMTP:[EMAIL PROTECTED]]
Sent: Monday, November 06, 2000 10:12 PM
To: CF-Talk
Subject: CFLDAP and EXCHANGE
This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.
- ------_=_NextPart_001_01C04881.9B4B1730
Content-Type: text/plain;
charset="iso-8859-1"
Hello all,
anybody out there been successful using CFLDAP and MS Exchange 5.5?
I have
full access to my exchange server but can't seem to find anything
helpful in
the Exch Admin, and my MasteringCF books don't into any detail about
Exchange.
Eric
- ------_=_NextPart_001_01C04881.9B4B1730
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>CFLDAP and EXCHANGE</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Hello all,</FONT>
</P>
<P><FONT SIZE=3D2>anybody out there been successful using CFLDAP and
MS =
Exchange 5.5? I have full access to my exchange server but
can't =
seem to find anything helpful in the Exch Admin, and my MasteringCF =
books don't into any detail about Exchange.</FONT></P>
<P><FONT SIZE=3D2>Eric</FONT>
</P>
</BODY>
</HTML>
- ------_=_NextPart_001_01C04881.9B4B1730--
- ----------------------------------------------------------------------
- --------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or
send a message with 'unsubscribe' in the body to
[EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBOggqcnYFmKomMlANEQJogACfa+fuhjn0pfmj9yyunCNZt3xuFzMAoNJh
oto+dSORdsJZPWWQrK/sjA5Q
=YmAE
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]