dcsimg
Sending Email from Lotus Notes R5 release 5.0.4
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Harpreet_Hira
Posted On:   Tuesday, July 30, 2002 03:30 PM

I need to write java code for sending an email from Lotus Notes release 5.0.4a. Initially, I tried using Lotus Domino Toolkit for java, but the current release, "Lotus Domino ToolKit for Java/Corba release 5.0.8" is not compatible with the notes client/server we are using(5.0.4a). Now, I am trying to use "Lotus Domino Toolkit 2.1" which supports notes version 5.0.3 and higher, but I couldnot find out how to use it to send email. Is there are other way in which we can connect to Lotus Notes for sending email. I couldnot use SMTP as the Lotus Notes administrator is afraid of security issues so there is no possibility that I can connect to Domino server using java mail API by enabling SMTP on the Do   More>>

I need to write java code for sending an email from Lotus Notes release 5.0.4a.


Initially, I tried using Lotus Domino Toolkit for java, but the current release, "Lotus Domino ToolKit for Java/Corba release 5.0.8" is not compatible with the notes client/server we are using(5.0.4a).
Now, I am trying to use "Lotus Domino Toolkit 2.1" which supports notes version 5.0.3 and higher, but I couldnot find out how to use it to send email.


Is there are other way in which we can connect to Lotus Notes for sending email. I couldnot use SMTP as the Lotus Notes administrator is afraid of security issues so there is no possibility that I can connect to Domino server using java mail API by enabling SMTP on the Domino server.


I would be thankful if somebody can help me to do this.

   <<Less

Re: Sending Email from Lotus Notes R5 release 5.0.4

Posted By:   venkat_subramanian  
Posted On:   Monday, August 12, 2002 04:41 PM

You should be able to send emails out using the Lotus Domino ToolKit for Java/Corba release. This supports Lotus Domino and Notes R5, Release 5.0.3 or higher as indicated in the Toolkit doc.

Nice Forums for Lotus are in WWW.notes.net or http://www-10.lotus.com/ldd/46dom.nsf.

The following code is a example using ToolKit for Java/Corba release:


import lotus.domino.*;
import java.util.Vector;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Database db = agentContext.getCurrentDatabase();
DocumentCollection dc = db.search("Subject =
"Test appendItemValue"");
if (dc.getCount() == 1) {
Document doc = dc.getFirstDocument();
Document memo = db.createDocument();
memo.appendItemValue("Form", "Memo");
memo.appendItemValue
("Subject", "Test - please reply if you get this");
RichTextItem rti = memo.createRichTextItem("Body");
doc.renderToRTItem(rti);
Vector v = new Vector();
v.addElement(session.getUserName());
v.addElement("Kyla Town");
v.addElement("Lakshmi Annavajhala");
v.addElement("Evelyn McKay");
memo.setEncryptOnSend(true);
memo.setSaveMessageOnSend(true);
memo.setSignOnSend(true);
memo.sign();
memo.send(true, v); }
} catch(Exception e) {
e.printStackTrace();
}
}
}

About | Sitemap | Contact