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 04-16-2007, 08:49 AM
Zimlet Guru & Moderator
 
Posts: 288
Question Save mail on hard disk in a readable format

hello everyone,

I'm trying to make a zimlet that allow a user to save a mail by dropping it on the zimlet. But I don't want to keep the original format of the mail.

For us french who use lot of accents we really can't understand mails in the original format.

So to do that I try to get the mail content and to analyse it for finally write a readable version in a file and get the file by a redirection.

My problem is that I don't know how to get the mail content in a jsp file. I want to use a jsp file because I need to get the mail content and to be able to analyse it but I also need to create a file and to write in the file (this is impossible with javascript, no?, and I don't to use an external application (like a php file) if it's possible).

Someone have an idea on how to get it? I already try by using the url of the mail but I get a http code 401 error when I try to load it.

All ideas about how to do the zimlet are also welcome .
Reply With Quote
  #2 (permalink)  
Old 04-17-2007, 01:16 AM
Former Zimbran
 
Posts: 5,606
Default

Can you pass it to the google translator?
If you do a french to french translation, that might clear it up.
Reply With Quote
  #3 (permalink)  
Old 04-17-2007, 02:39 AM
Zimlet Guru & Moderator
 
Posts: 288
Question

there isn't french to french translation in the google translator. And sorry but I don't understand how it can help me to get the mail.

One more thing that i want to know:
on the wiki about jsp ( http://wiki.zimbra.com/index.php?title=ZimletJSP ) you give available fields for contacts and appointements but what are the available fields for message and conversation ?

Last edited by tdesorbaix; 04-17-2007 at 02:48 AM..
Reply With Quote
  #4 (permalink)  
Old 04-18-2007, 04:07 AM
Zimlet Guru & Moderator
 
Posts: 288
Default

I find a solution to get the message but I still have a problem :
I try to get the message from param in the <action url> in the xml file

Code:
<dragSource type="ZmMailMsg">
		<canvas type="window" width="600" height="350"/>
		<actionUrl target="/service/zimlet/_dev/com_zimbra_test12/test12.jsp">
			<param name="from">${obj.from}</param>
			<param name="to">${obj.to}</param>
			<param name="cc">${obj.cc}</param>			
			<param name="subject">${obj.subject}</param>
			<param name="date">${obj.date}</param>
			<param name="fragment">${obj.body}</param>
			<param name="attachment">${obj.attachment}</param>		
		</actionUrl>
	</dragSource>
I find the param obj.body to get the body of the message but obj.from , obj.to and obj.cc return "undefined". Can someone say me the name of the attributes to get from, to and cc please?
Reply With Quote
  #5 (permalink)  
Old 04-11-2008, 02:34 PM
New Member
 
Posts: 4
Default

I am having the exact same problem. ${obj.from} returns undefined. Any answer on this?
Reply With Quote
  #6 (permalink)  
Old 04-14-2008, 01:20 AM
Zimlet Guru & Moderator
 
Posts: 288
Default

Welcome to the forum.

If I remember correctly, those attributes can only be use in the js file.
Anyway, since the POST method is not supported by the <actionUrl>, you should not use this attribute in the xml fle.
Even if the whitepaper say you can add the option, I tested and it doesn't work.
Try to have only a very limited amount of information in your url (1000 characters).

If you want to do same zimlet, it is already done. Look here :
http://www.zimbra.com/forums/zimlets...-txt-file.html

Last edited by tdesorbaix; 04-14-2008 at 01:25 AM..
Reply With Quote
  #7 (permalink)  
Old 10-14-2008, 09:43 PM
Member
 
Posts: 11
Default obj.to and obj.from

Quote:
Originally Posted by qkmadson View Post
I am having the exact same problem. ${obj.from} returns undefined. Any answer on this?
Hello,

I have the same question...

obj.to and obj.from exist?
Have a way more simplist to get this values?
Im using the com_zimbra_jspsample zimlet

===============
<dragSource type="ZmMailMsg">
<canvas type="dialog" width="600" height="350"/>
<actionUrl target="/service/zimlet/com_zimbra_jspsample/sample.jsp">
<param name="subject">${obj.subject}</param>
<param name="id">${obj.id}</param>
<param name="email">${obj.email}</param>
</actionUrl>
</dragSource>
================
Where obj.subject and obj.id works fine... but obj.to, obj.from, obj.email. Returns NULL

Tanks...
Rafael Carvalho
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.