Results 1 to 5 of 5

Thread: Launch action on mail sent

  1. #1
    flegastelois is offline Starter Member
    Join Date
    May 2010
    Posts
    2
    Rep Power
    4

    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
    tdesorbaix is offline Zimlet Guru & Moderator
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    365
    Rep Power
    8

    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
    flegastelois is offline Starter Member
    Join Date
    May 2010
    Posts
    2
    Rep Power
    4

    Default

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

    Regards,

  4. #4
    lfasci is offline Trained Alumni
    Join Date
    Jul 2006
    Location
    Pisa
    Posts
    134
    Rep Power
    8

    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
    ratasoft is offline Junior Member
    Join Date
    Apr 2010
    Posts
    8
    Rep Power
    4

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mail deferred with Connection timed out
    By Miklos Kalman in forum Administrators
    Replies: 7
    Last Post: 11-17-2012, 06:11 AM
  2. Replies: 15
    Last Post: 11-19-2009, 12:16 AM
  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, 10: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
  •