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 05-28-2010, 03:35 AM
Starter Member
 
Posts: 2
Default Launch action on mail sent

Hi everybody,

My "problem" is very simple : when I click on "Sent" button, I want to launch many action, like :
- catching the subject of the mail
- catching the main content mail
- catching the attachment (if is exists)
- ....
- sent all of those to an external application with webservices

So, is it possible with Zimlet?

Thank's for your help.
Regards,
Reply With Quote
  #2 (permalink)  
Old 06-01-2010, 01:02 AM
Zimlet Guru & Moderator
 
Posts: 288
Default

Yes, it is possible.

You can for example rewrite the sendMsg function executed when you click on the button send.

Here is an example code :

Code:
function ZimletName() {
};

ZimletName.prototype = new ZmZimletBase();
ZimletName.prototype.constructor = ZimletName;

ZimletName.prototype.onShowView = function(viewId, isNewView) {
	//Define the modified sendMsg method
	if (viewId == ZmId.VIEW_COMPOSE){
		this.defineSend();
	}
};

ZimletName.prototype.defineSend = function() {
	var controller = appCtxt.getCurrentController();
	if(!controller._toolbar) {
		controller._initializeToolBar();
	}
	//Define the sendMsg method of the ZmComposeController
	controller.sendMsg = function(attId, draftType, callback) {
		//write here the code of the sendMsg method and your specific code
		alert("test");
	};
};
Reply With Quote
  #3 (permalink)  
Old 06-01-2010, 02:06 AM
Starter Member
 
Posts: 2
Default

Thank you for your reply.
I hasten to go test it.

Regards,
Reply With Quote
  #4 (permalink)  
Old 06-08-2010, 12:47 AM
Trained Alumni
 
Posts: 127
Default

If you are working on 6.0.x you can use the zimlet function emailErrorCheck.
You can see how it works in the com_zimbra_attachmentalert zimlet.
__________________
http://www.seacom.it
Reply With Quote
  #5 (permalink)  
Old 06-14-2010, 08:34 AM
Junior Member
 
Posts: 8
Default I try but cant

I try use this code but dont work.

if alert (appCtxt.getAppViewMgr().getCurrentViewId()) I get COMPOSE1.

if alert (ZmId.VIEW_COMPOSE) I get COMPOSE.
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.