Anyone know where I can find a JSP sample that shows how to query an external LDAP server.
We're looking to write a Zimlet that would query an external LDAP and build a new email with the TO: built from the returned data.
Thanks,
Matt
Anyone know where I can find a JSP sample that shows how to query an external LDAP server.
We're looking to write a Zimlet that would query an external LDAP and build a new email with the TO: built from the returned data.
Thanks,
Matt
Almost three years on and no reply? Bummer.
I'm trying to do the same thing except we have multiple domains and a variety of mail servers. Our intranet application can easily present a consolidated list of addresses with checkboxes for peeps to select as recipients, but I can't figure out how to get the information from the zimlet into the TO field.
I found this (Zimlet to prepare a formated email) This seems ideal since the TO field is already in the browser and ready to be tinkered with. I just can't get it to populate. I've tried the ultra-simple, ultra-obvious choice... onclick="document.getElementById('zv__COMPOSE_to_c ontrol').value=LIST_OF_ADDRESSES;
But that seems to be ultra-wrong.
Any help would be greatly appreciated. Thank you!
mf
You can query any ldap via an integrated .JSP file..
Then call your own Zimlet .jsp via a JavaScript method to get the results.Code:<%@ page import="com.sun.jndi.ldap.*" %> ... ... env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory" ); env.put("java.naming.ldap.version", "3"); env.put( Context.PROVIDER_URL, "ldap://" + ldapServerName + "/" ); env.put( Context.SECURITY_AUTHENTICATION, "simple"); env.put( Context.SECURITY_PRINCIPAL, rootdn ); env.put( Context.SECURITY_CREDENTIALS, rootpass );
Hope this helps!
-Rob
Aye, but that's part of the problem. We have an exchange server that provides LDAP info for some employees. We have other employees that use SquirrelMail and others still that use their own office system. We do, however, have what amounts to an enterprise phonebook which stores contact info on everyone in a database, just not an x.500 or ldap database.
So, my hope/goal is to build a zimlet that displays a form that will allow users to search for and select recipients and have that form (enter pixie dust) populate the to/cc/bcc fields of an email. The pixie dust or how to get the zimlet form data into the fields is why I'm here.
I suppose my next alternative would be to create an ldap server and populate/maintain it using our phonebook as the source. Again, I truly appreciate everyone's time and attention. If I get this worked out, I will surely post my solution here. Thank you!!!
mf
I'd look at possibly creating an application outside of Zimbra to do your searching, then create a simple Zimlet to bring up that application in an HTML iframe when you click on it. Just a thought.. Good luck!
There are currently 1 users browsing this thread. (0 members and 1 guests)