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 01-24-2008, 06:18 AM
Intermediate Member
 
Posts: 17
Default Opening new message dialog from Zimlet

Hello,

I have been working on an Alfresco browsing Zimlet and I wanted to programmatically open a new message dialog from a Zimlet. So I do not want to send an email via SOAP, just to open the new message dialog programmatically. Does anyone know, if this is possible, and if yes, how can you do it?

The other thing, I wanted to ask is: is it possible to detect that the new message dialog is already open from a Zimlet dialog? Any hints on how to do are really most welcome.

Best regards,

Gil
Reply With Quote
  #2 (permalink)  
Old 01-30-2008, 11:00 AM
Intermediate Member
 
Posts: 17
Default

Hello,

I found out how to open the compose mail folder from a Zimlet. Here is the piece of code that does the job for me:

Code:
// Tries to open the compose view on its own.
var composeController = AjxDispatcher.run("GetComposeController");
if(composeController) {
	var appCtxt = window.top.appCtxt;
	var zmApp = appCtxt.getApp();
	var newWindow = zmApp != null ? (zmApp._inNewWindow ? true : false) : true;
	var params = {action:ZmOperation.NEW_MESSAGE, inNewWindow:newWindow, 
	toOverride:null, subjOverride:null, extraBodyText:null, callback:null}
	composeController.doAction(params); // opens asynchronously the window.
	this.displayStatusMessage("Trying to open a new message dialog. Please wait ...");
}
It was not a piece of cake to discover this !

Best regards,

Gil
Reply With Quote
  #3 (permalink)  
Old 09-07-2009, 02:55 PM
Intermediate Member
 
Posts: 22
Default

Hello,
what should I add to params to have a new html message instead of plain text?

Thanks in advance,

Leo
p.s. where can I see the parameters and all API. I'm confused. I can just create zimlets joining and glueing different snippets I find on the forum: I feel not very professional
Reply With Quote
  #4 (permalink)  
Old 09-07-2009, 02:56 PM
Intermediate Member
 
Posts: 22
Default param to add for html

Hello,
what should I add to params to have a new html message instead of plain text?

Thanks in advance,

Leo
p.s. where can I see the parameters and all API. I'm confused. I can just create zimlets joining and glueing different snippets I find on the forum: I feel not very professional
Reply With Quote
  #5 (permalink)  
Old 09-08-2009, 02:15 AM
Zimlet Guru & Moderator
 
Posts: 265
Default

Quote:
Originally Posted by leocor View Post
Hello,
what should I add to params to have a new html message instead of plain text?

Thanks in advance,

Leo
p.s. where can I see the parameters and all API. I'm confused. I can just create zimlets joining and glueing different snippets I find on the forum: I feel not very professional
Look at zimbra source code .
To always create a html message, you can add the param "composeMode" :
Code:
// Tries to open the compose view on its own.
var composeController = AjxDispatcher.run("GetComposeController");
if(composeController) {
	var appCtxt = window.top.appCtxt;
	var zmApp = appCtxt.getApp();
	var newWindow = zmApp != null ? (zmApp._inNewWindow ? true : false) : true;
	var params = {action:ZmOperation.NEW_MESSAGE, inNewWindow:newWindow, 
	toOverride:null, subjOverride:null, extraBodyText:null, callback:null, composeMode:DwtHtmlEditor.HTML}
	composeController.doAction(params); // opens asynchronously the window.
	this.displayStatusMessage("Trying to open a new message dialog. Please wait ...");
}
Reply With Quote
  #6 (permalink)  
Old 10-26-2011, 10:36 AM
New Member
 
Posts: 3
Default Please Help me

Hello,
what should I add to params to have a new message with attach File?

Thanks in advance,
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.