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 06-08-2010, 05:33 AM
Intermediate Member
 
Posts: 21
Default Add another send button on the mail toolbar

Hi

im looking for a zimlet that would add another button say next to the "Send" button. It would be named something like "Send to archive". The new button would send the email as normal, but always with a fixed cc address.

I have managed to get a button up in the mail toolbar. So basically wondering how i can get it to do what i want.
Reply With Quote
  #2 (permalink)  
Old 06-08-2010, 05:59 AM
Moderator
 
Posts: 7,929
Default

Did you take a look at the Zimlet threads ?

Launch action on mail sent
__________________
Reply With Quote
  #3 (permalink)  
Old 06-08-2010, 09:28 AM
Zimlet Guru & Moderator
 
Posts: 288
Default

You can also look at the salesforce zimlet : "com_zimbra_sforce.zip"

It add a button in the compose view next to the "Send" button.
Reply With Quote
  #4 (permalink)  
Old 06-09-2010, 02:32 AM
Intermediate Member
 
Posts: 21
Default

Thank you for the replies. I have looked at the Launch action on mail sent tread , and tried to combine that code with mine , but it only made my button disapear, so im guessing im doing it wrong.

Here is my current code :

Quote:
com_zimbra_test_HandlerObject = function() {
};
com_zimbra_test_HandlerObject.prototype = new ZmZimletBase;
com_zimbra_test_HandlerObject.prototype.constructo r = com_zimbra_test_HandlerObject;

com_zimbra_test_HandlerObject.prototype.initialize Toolbar =
function(app, toolbar, controller, viewId) {

if (viewId.indexOf(ZmId.VIEW_COMPOSE) ==0) {
// get the index of "View" menu so we can display the button after that
var buttonIndex = 0;
for (var i = 0; i < toolbar.opList.length; i++) {
if (toolbar.opList[i] == ZmOperation.VIEW_MENU) {
buttonIndex = i + 1;
break;
}
}

var buttonParams = {
text : "Send to Archive",
tooltip: "This button sends a email with cc to a fixed address ",
index: buttonIndex, // position of the button
image: "zimbraicon" // icon
};

// creates the button with an id and params containing the button details
var button = toolbar.createOp("Send to Archive", buttonParams);
button.addSelectionListener(new AjxListener(this, this._showSelectedMail, controller));
}
};

// * Add cc and send mail.
com_zimbra_test_HandlerObject.prototype._showSelec tedMail =
function(controller) {





};
That is my code so far. Its pretty much something i have taken from some examples. Wich gets the job of adding the button done.

I`m missing som code under the "Add cc and send email" part. kinda stuck on what to put in there so that the button will be able to send mail with a fixed cc address. Would be nice with some advice. As my javascript & zimbra knowledge is limited. But rising fast
Reply With Quote
  #5 (permalink)  
Old 06-18-2010, 06:16 AM
Special Member
 
Posts: 160
Default

Quote:
Originally Posted by berjos View Post
Thank you for the replies. I have looked at the Launch action on mail sent tread , and tried to combine that code with mine , but it only made my button disapear, so im guessing im doing it wrong.

Here is my current code :



That is my code so far. Its pretty much something i have taken from some examples. Wich gets the job of adding the button done.

I`m missing som code under the "Add cc and send email" part. kinda stuck on what to put in there so that the button will be able to send mail with a fixed cc address. Would be nice with some advice. As my javascript & zimbra knowledge is limited. But rising fast

Did you ever get a functioning button? I am trying to do something similar. I want to add a second send button that will modify the subject of the message then send.

Thanks!
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.