Results 1 to 4 of 4

Thread: Zimlet Email Processing

  1. #1
    jfavero is offline Project Contributor
    Join Date
    Jan 2007
    Posts
    31
    Rep Power
    8

    Default Zimlet Email Processing

    I want to drap and drop an email from the Inbox into my Zimlet. The Object type I am getting a ZmConv. I actually expected to get the ZmMailMsg. Why is it be treated as such?? How do I get to the emal message and attachments to the email message? Also, is there way to convert the email message to an XML format for offline storage?? I want to take the entire email and attachments and store them to an offline storage area for archiving.

    Thanx Joe

  2. #2
    JoshuaPrismon is offline Zimlet Guru & Moderator
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    9

    Default

    Quote Originally Posted by jfavero View Post
    I want to drap and drop an email from the Inbox into my Zimlet. The Object type I am getting a ZmConv. I actually expected to get the ZmMailMsg. Why is it be treated as such?? How do I get to the emal message and attachments to the email message? Also, is there way to convert the email message to an XML format for offline storage?? I want to take the entire email and attachments and store them to an offline storage area for archiving.

    Thanx Joe
    ZmConv is the "Conversation" (ie, threaded mail messages) that was dragged over. ZmConv is actually derived from ZmMailItem item, which means you should be able to access it just like a regular message.

    According to the notes in ZmConv.js (if you haven't done a SVN checkout of the Zimbra tree, grab it. Javascript is surprisingly readable) the following messages on the conv will return the messages:
    getHotMsg -- Returns the searched for message, or the newest message.
    getFirstMsg -- Should be pretty obvious.

    .msgs should contain the rest of the messages.

    Note: I haven't tried this yet, but go ahead and give it a shot and let me know what you find. Also note that ZmMailItem consists of multiple parts, attachments, etc. That could be hairy, and you may want to look at the JSP taglib rather then pure javascript to see if that is a easier way to go about it.

  3. #3
    jfavero is offline Project Contributor
    Join Date
    Jan 2007
    Posts
    31
    Rep Power
    8

    Default

    I have pulled the source code from SVN, however I still am having problems understanding how this all works.

    I have a ZmConv (Conversation) object. How do I access the attachements, from/to addresses etc.

    I tried

    zmConv.firstMsg to get the first message, however this is undefined.

    I have looked at the java classes, Conversation and Mailitem, however I am not sure how they map to what is exposed in the JavaScript. Can you provide an example of getting the list of FROM addresses from a ZmConv??

    Thanx Joe

  4. #4
    Ericx is offline Loyal Member
    Join Date
    Jul 2006
    Location
    Virginia Beach, VA
    Posts
    97
    Rep Power
    9

    Default Workaround

    I got around it by only allowing the mail message to drag and drop.
    I've just finished basically what you are trying to do.
    <dragSource type="ZmMailMsg" />

    If you read the wiki, I posted code to extract the email using REST commands.
    The code on my wiki ends with the files on the web server, I was able to use php ftp class to move the files to the project folders on the windows server.

    I'm on an intranet so I can get away with some of these things. I think I'd do it a bit differently if I were live on the net.


    http://wiki.zimbra.com/index.php?title=Zimbra_to_PHP
    EricX

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 10:06 AM
  2. need advice on configuring zimbra to work with fax server
    By pheonix1t in forum Administrators
    Replies: 0
    Last Post: 07-11-2007, 07:46 PM
  3. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM
  4. upgrade to 4.0.3 antispam does'nt work
    By lucanannipieri in forum Administrators
    Replies: 14
    Last Post: 11-07-2006, 03:56 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
  •