Trying to get Xagent to run on schedule by starting from a scheduled Java agent.
Below is the code for my xagentmail.xsp, which just sends me an email:
<?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core" rendered="false"> <xp:this.beforePageLoad><![CDATA[#{javascript: // test send mail doc = database.createDocument() ; doc.replaceItemValue("Form", "memo"); doc.replaceItemValue("Subject", " from xagentmail.xsp"); doc.replaceItemValue("SendTo", " PDella-Nebbia@testdomain.com "); doc.send(); }]]></xp:this.beforePageLoad> </xp:view>
Using the SSL-ENCRYPTED connection approach described on Devin Olson's Scheduled Xagents blog , I created the following Domino Java scheduled agent:
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.Socket; import javax.net.ssl.SSLSocketFactory; import lotus.domino.AgentBase; public class JavaAgent extends AgentBase {
When I enter the URL in the browser to my xagentmail.xsp, I receive the mail as expected.
But my planned Java agent does not start Xagent to send mail.
I set up anonymous Reader access for the application with both the agent and xagent. I also have limited and unlimited privileges on the server.
Any ideas?
source share