Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-26-2008, 06:56 AM
Trained Alumni
 
Posts: 343
Default Query External LDAP from Zimlet

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
Reply With Quote
  #2 (permalink)  
Old 03-30-2009, 10:50 AM
New Member
 
Posts: 3
Default

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
Reply With Quote
  #3 (permalink)  
Old 04-02-2009, 05:02 PM
Project Contributor
 
Posts: 67
Default

You can query any ldap via an integrated .JSP file..

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 );
Then call your own Zimlet .jsp via a JavaScript method to get the results.

Hope this helps!
-Rob
Reply With Quote
  #4 (permalink)  
Old 04-03-2009, 07:46 AM
New Member
 
Posts: 3
Default

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
Reply With Quote
  #5 (permalink)  
Old 04-14-2009, 06:42 PM
Project Contributor
 
Posts: 67
Default

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!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.