Sorry,
perhaps I explained evil,
I 've a zimlet, written in Javascript, from which I want to adding an attachment at the current mail message. I never use java file into a Zimlet, and never I read how develop this.
I have that method, in javascript
Quote:
//this method add a tag "Attach from Kt"
Com_Zimbra_Ktconnector.prototype.addKTTabToAttachD ialog = function()
{
var attachdlg = this._attachdlg = appCtxt.getAttachDialog ();
var tabview = attachdlg ? attachdlg.getTabView () : null;
this.FTV = new KTTabView (tabview, this);
var tabkey = attachdlg.addTab ("kt", "kt docs", this.FTV);
attachdlg.addOkListener (tabkey, new AjxCallback (this, this.onKtLoaderDlgInsertFolder));
}
//now I insert the kt folder from which select the documents
Com_Zimbra_Ktconnectorvm13d.prototype.onKtLoaderDl gInsertFolder = function()
{
;
var d = this.InsertFolderDlg._getContentDiv (); /* Initialize the Upload Dialog */
_clearElement (d);
var div = document.createElement ("div");
var titleS = document.createElement ("span");
titleS.className = "Yflickr_hLeft";
titleS.appendChild (document.createTextNode ("KT Folder (Necessary): "));
var titleI = document.createElement ("input");
titleS.appendChild (titleI);
div.appendChild (titleS);
d.appendChild (div);
this.InsertFolderDlg.setButtonListener (DwtDialog.OK_BUTTON, new AjxListener (this, function() { this.onKtLoaderDlg (titleI.value); }));
this.InsertFolderDlg.popup();
}
//now, call the jsp loadFile, at the end I've some document url to attach at mail msg.
Com_Zimbra_Ktconnectorvm13d.prototype.onKtLoaderDl g = function(folder)
{
this.KtLoaderDlg = new DwtDialog (appCtxt.getShell(),null,"Upload Document from KnowledgeTree ("+folder+")",[DwtDialog.OK_BUTTON]);
var d = this.KtLoaderDlg._getContentDiv (); /* Initialize the Upload Dialog */
_clearElement (d);
var urlJsp = this.getResource("loadFile.jsp");
var urlDest = this.getResource("done.jsp");
var parametri = "?username="+this.getUserProperty("z_username")+"& passwd="+this.getUserProperty("z_password")+"&ktur l="+this.getUserProperty("z_url")+"&ktport="+this. getUserProperty("z_port")+"&folder="+folder+"&urlJ sp="+urlJsp+"&urlDest="+urlDest;
var d = this.KtLoaderDlg._getContentDiv (); /* Initialize the Upload Dialog */
_clearElement (d);
this.KtLoaderDlg.setContent("<iframe src =\"http://zimbuntu.intranet.noze.it"+urlJsp+parametri+"\"wid th=\"100%\"> </iframe>");
this.KtLoaderDlg.setButtonListener (DwtDialog.OK_BUTTON, new AjxListener (this, function() { this.KtLoaderDlg.popdown(); this.InsertFolderDlg.popdown();}));
this.KtLoaderDlg.popup();
}
|
Now, I must write a method to attach a document to the mail (from document url).
It's possible without servlet?
I need only a method that, given a mail message and a url, attach at mail message the document that is at the url.
Thanks for your time