| 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.
|  | 
01-24-2008, 06:18 AM
| | Intermediate Member | |
Posts: 17
| | 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 | 
01-30-2008, 11:00 AM
| | Intermediate Member | |
Posts: 17
| | 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 | 
09-07-2009, 02:55 PM
| | Intermediate Member | |
Posts: 22
| | 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 | 
09-07-2009, 02:56 PM
| | Intermediate Member | |
Posts: 22
| | 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 | 
09-08-2009, 02:15 AM
| | Zimlet Guru & Moderator | |
Posts: 265
| | Quote:
Originally Posted by leocor 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 ...");
} | 
10-26-2011, 10:36 AM
| | | Please Help me Hello,
what should I add to params to have a new message with attach File?
Thanks in advance, | | Thread Tools | Search this Thread | | | | | Display Modes | Linear Mode | | Why Join? Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.  |