Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-24-2010, 08:15 AM
Beginner Member
 
Posts: 1
Default Sending email zdesktop

Hi all,
i'm new with zimlets.i have installed zdesktop (winxp) i'm trying to send an email inside a zimlet.
I tried some js code but nothing happened.
in particular i tried this function:

function(destName, destEmail, subject, body)
{
debugger;
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);
};

Any ideas??
thank you for your help
Christian
Reply With Quote
  #2 (permalink)  
Old 02-24-2010, 08:18 AM
Zimbra Employee
 
Posts: 105
Default

Checkout this example. It shows calling the SOAP API from a Zimlet (in both supported formats: XML + JSON).

ZCS 6.0:Zimlet Developers Guide:Examples:SOAP API Basics - Zimbra :: Wiki
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.