Hi there
In a Zimlet I'm developing (primarily in JavaScript), one function needs to take an URL and attach the contents of the response to an email. I can call the mail composer alright, but not attach the file.
Basically, I need to create a servlet similar to the FileUploadServlet, that gets it's data from a specified URL rather than the contents of the POST request. Getting the contents is easy enough, so consider cloning FileUploadServlet.java to be done. Now, where should the class file be placed so it is reachable from the Zimlet, and how can I specifically access it from the JavaScript of the Zimlet and attach it to the mail (I guess some kind of SOAP is needed)
The following code works for me, except I don't have the attachment id:
var msg = new ZmMailMsg();
msg.setSubject("Message subject test");
msg.addAttachmentId(att.aid); // <= I guess this is what I need returned
var params={
action: ZmOperation.FORWARD,
msg: msg
};
var composeController=AjxDispatcher.run("GetComposeCon troller");
composeController.doAction(params);
Any help will be greatly appreciated. Thanks in advance


LinkBack URL
About LinkBacks


