Results 1 to 3 of 3

Thread: Cannot get from address into dragSource

  1. #1
    Join Date
    Jan 2009
    Rep Power

    Default Cannot get from address into dragSource

    Here is a Zimlet that is supposed to do a Yahoo search on the From: address of an email that is dragged onto it:
    <zimlet name="com_mydomain_test" version="1.0" description="Our Test Zimlet">
      <zimletPanelItem label="Yahoo Lookup Zimlet">
          This Zimlet does a Yahoo lookup on an email address.
        <dragSource type="ZmMailMsg">
          <canvas type="window" width="400" height="400" />
          <actionUrl method="get" target="">
            <param name="p">${obj.from}</param>
    It does not work: the search that results is for the string "undefined". If I change "{$obj.from}" to "{$obj.subject}" I get a search on the email's subject; if I use ${obj.convId}" I get the correct conversation id. It only seems to fail with the from. The "to" attribute also fails.

    I checked the emails and they have From: headers of the form "From: John Public <>".

    Of the ones I tried, here are the ones that work
    • subject
    • date
    • id
    • convId
    • size

    and the ones that do not work (return "undefined"):
    • from
    • to

  2. #2
    Join Date
    Sep 2005
    Rep Power


    thats because with in Zimbra, "from" is not a string, but an object with email, firstname, fullname etc properties. And unfortunately writing zimlets via xml has some limitation and doesnt do things like toString() or allow little more complex things to get the information needed.

    The good news is you can however write up a small javascript to get the same thing done.
    com_mydomain_test.prototype.doDrop =
    function(zmObject) {
    	var from = "";
         if(zmObject.from) {
              from = zmObject.from[0];
         } else if(zmObject.participants) {//if conversation..
    	//get the first sender
    	var p = zmObject.participants;
    	for(var i =0; i < p.length; i++) {
    		if(p[i].type == "FROM") {
    			from = p[i].address;
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    Join Date
    Nov 2009
    Rep Power


    This is an older thread but posting this additional information for reference.

    This zimlet has an example of retrieving the from/to/cc addresses from a ZmMailMsg. This zimlet was written for ZCS 6.0:

    ZCS 6.0:Zimlet Developers Guide:Examples:Panel Item Drag Source Details - Zimbra :: Wiki

Similar Threads

  1. Canonical address for the From: address from Blackberry?
    By bthom73 in forum Zimbra Connector for BlackBerry
    Replies: 4
    Last Post: 05-05-2009, 09:37 AM
  2. I got Ubuntu and Zimbra working
    By pacsteel in forum Installation
    Replies: 73
    Last Post: 06-23-2008, 11:41 AM
  3. Auto-link to shared address books?
    By ragaskar in forum Users
    Replies: 2
    Last Post: 02-11-2008, 03:15 PM
  4. [SOLVED] Zimbra not syncing properly with Address Book and iCal
    By Colin Day in forum CalDAV / CardDAV / iSync
    Replies: 4
    Last Post: 07-13-2007, 08:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts