Results 1 to 2 of 2

Thread: forward Attachments

  1. #1
    leocor is offline Active Member
    Join Date
    Jul 2009
    Schio (VI) Italy
    Rep Power

    Default forward Attachments

    How could I forward an attachment to a new email?
    I'm able to grab the body and subject, but not attachments.

    I tried using zmObject.attachments or zmObject.getInlineAttachments without results (as written in Zimlet cookbook) but it seems I need something else.

    I had a look to email2doc but it seems it puts a simply a link to the object attched more than embed the object (clearly it has create a doc, not an email). Or maybe I didn't look in the right way.

    Any suggestion?

    Best regards,

  2. #2
    leocor is offline Active Member
    Join Date
    Jul 2009
    Schio (VI) Italy
    Rep Power


    In case this can help someone (and someone can help me), this is the snippet I assembled:

    com_zimbra_calls2.prototype.doDrop =				// on Drop do:
    function(zmObject) {
    	if (!zmObject.srcObj)
    	zmObject = zmObject.srcObj;
    	if (zmObject.type == "CONV") {
    		zmObject = zmObject.getFirstHotMsg(); 		// if in a CONVersation, grab the last (?) message received
    	//get Subject
    	var subject = zmObject.subject; 
    	//get Body (composing always in html)
    	var body = zmObject.getBodyContent().replace(/\r\n|\n/g, "<br>");
    	// get Destination emails	
    	var to = [];								// to,from,cc,bcc (reply_to, sender ?)
    	var participants = zmObject.participants.getArray(); 			// get all email participants 
    	for(var i =0; i < participants.length; i++) {
    	     if(participants[i].type == AjxEmailAddress.TO) {	// choose which type of participants (TO,FROM,CC,BCC,REPLY_TO,SENDER
    		      to.push(participants[i].address);		// add participants to variable (in this case "to")
    // here there should be something for Attachments
    // var attaArray =  zmObject.attachments;
    //	debug lines
    //	alert ( "body: " + body); ....
    	var composeController ="GetComposeController");    // create email
    		if(composeController) { 
    			Compose_Mail_Example.count = Compose_Mail_Example.count + 1;    // this is just to count the number of tests
    			body = body + "<br> test number: " + Compose_Mail_Example.count;
    			var newWindow = false;
    //			var to = "";					// just as example
    			var params = {action:ZmOperation.NEW_MESSAGE, inNewWindow:newWindow, 
    			toOverride:to, subjOverride:subject, extraBodyText:body, callback:null, composeMode:DwtHtmlEditor.HTML}
    			composeController.doAction(params); // opens asynchronously the window, composing in HTML
    Last edited by leocor; 10-13-2009 at 06:11 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. zmtrainsa does not see attachments
    By dvb in forum Administrators
    Replies: 3
    Last Post: 04-24-2012, 08:18 AM
  2. Cant forward pictures in attachments
    By ask2me007 in forum Administrators
    Replies: 5
    Last Post: 10-22-2009, 09:55 AM
  3. [SOLVED] Forward a message w/ attachments?
    By Shad0w in forum Zimlets
    Replies: 2
    Last Post: 09-15-2008, 10:43 AM
  4. Zimbra Webclient Mail forward as attachments
    By amitbiswas in forum Users
    Replies: 5
    Last Post: 03-17-2008, 02:59 AM
  5. Drag email to calendar and attachments
    By Richard in forum Users
    Replies: 2
    Last Post: 09-14-2006, 12:09 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