Results 1 to 5 of 5

Thread: Launch action on mail sent

  1. #1
    Join Date
    May 2010
    Posts
    2
    Rep Power
    6

    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,

  2. #2
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    367
    Rep Power
    9

    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");
    	};
    };

  3. #3
    Join Date
    May 2010
    Posts
    2
    Rep Power
    6

    Default

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

    Regards,

  4. #4
    Join Date
    Jul 2006
    Location
    Pisa
    Posts
    135
    Rep Power
    10

    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.

  5. #5
    Join Date
    Apr 2010
    Posts
    8
    Rep Power
    6

    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.

Similar Threads

  1. Mail deferred with Connection timed out
    By Miklos Kalman in forum Administrators
    Replies: 7
    Last Post: 11-17-2012, 05:11 AM
  2. Replies: 15
    Last Post: 11-18-2009, 11:16 PM
  3. server dropped connection
    By ferra in forum Installation
    Replies: 20
    Last Post: 10-06-2008, 04:32 PM
  4. [SOLVED] Mailserver down when send file attach of 50Mb
    By ZMilton in forum Administrators
    Replies: 20
    Last Post: 04-10-2008, 11:44 AM
  5. Issues...
    By timothyalangorman in forum Administrators
    Replies: 3
    Last Post: 11-19-2007, 09:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •