I'm a starter for zimbra,And I want to send a mail to certain address in my zimlet.What is the best way to do that?Could anyone show the detail in javascript or other.Thanks for attention!!!
Com_hello_a.prototype.singleClicked = function(msgValue) {
var view = new DwtComposite(this.getShell());
var el = view.getHtmlElement();
var div = document.createElement("div");
var msgId = Dwt.getNextId();
if (msgValue) {
msgValue = msgValue.replace(/\x27/, "");
msgValue = AjxStringUtil.htmlEncode(msgValue);
}
div.innerHTML=
[ "To: <input id='rec' name='rec' type='text' \>" ,
"message"<input id='file' name='file' type='text' \>"
].join("\n");
el.appendChild(div)
var dialog_args = {
title : "Send this message?",
view : view
};
var dlg = this._createDialog(dialog_args);
dlg.popup();
dlg.setButtonListener(DwtDialog.OK_BUTTON,
new AjxListener(this, function() {
sendmail();
dlg.popdown();
dlg.dispose();
}));
dlg.setButtonListener(DwtDialog.CANCEL_BUTTON,
new AjxListener(this, function() {
dlg.popdown();
dlg.dispose();
}));
};
function sendmail(){
//what should I do here?
}