I edited the message to show full code
It_Seacom_Zimlet.prototype.getUserDisplayName =
function() {
if(!appCtxt.get(ZmSetting.DISPLAY_NAME)) return "";
return appCtxt.get(ZmSetting.DISPLAY_NAME);
};
It_Seacom_Zimlet.prototype.getUserReplyTo =
function() {
return appCtxt.get(ZmSetting.REPLY_TO_ADDRESS);
};
It_Seacom_Zimlet.prototype._sendMsg =
function(destName, destEmail, subject, body) {
var soapDoc = AjxSoapDoc.create("SendMsgRequest", "urn:zimbraMail", "noSave=0");
var m = soapDoc.set("m");
m.setAttribute("idnt", this.userID);
var node_e = soapDoc.set("e", null, m);
node_e.setAttribute("p", this.getUserDisplayName() );
node_e.setAttribute("a", this.getUserReplyTo());
node_e.setAttribute("t", "f");
node_e.setAttribute("p", destName);
node_e.setAttribute("a", destEmail);
node_e.setAttribute("t", "t");
var node_s = soapDoc.set("su",subject , m);
var node = soapDoc.set("mp", null, m);
node.setAttribute("ct", "text/plain");
var subnode = soapDoc.set("content", body, node);
var command = new ZmCsfeCommand();
var resp = command.invoke({soapDoc: soapDoc});
var r = "Message sent";
DBG.println(AjxDebug.DBG2, "result:" + r);
this.displayStatusMessage(r);
};
Last edited by lfasci : 02-28-2008 at 10:44 AM.
|