Forums Register Login

Sending mail to lotus notes server

+Pie Number of slices to send: Send
Hi All;
I am very new to lotus notes and I am trying to send a email through lotus notes server but I am getting the following exception:
"4271 Password or other security violation for database"
I have installed the Lotus Notes client on my m/c ver. 5.0.3. and I am trying to connect to remote server
Here is the Code that i using
----------------------------
import lotus.domino.*;
public class SendLotusMail extends AgentBase {
public static void main(String args[]) {
String userID = "uid";
String pwd = "passwd";
String serverName = "server_name";
String mailfile = "mail_file";
try {
NotesThread.sinitThread();
String x = null;
Session session = NotesFactory.createSession(x, x, pwd);
Database db = session.getDatabase(server_name, mailfile);
Document email = db.createDocument();
email.appendItemValue("From","the junk address");
email.appendItemValue("Subject", "Test Secure E-Mail ");
email.appendItemValue("ReturnReceipt", "1");
//add attatchment
RichTextItem rtitem = email.createRichTextItem("Body");
rtitem.embedObject(
EmbeddedObject.EMBED_ATTACHMENT,
null,
"C:\\Windows\\15658.pdf",
"15658");
email.setSignOnSend(true);
email.sign();
email.send(true,"recepient mail address ");
} catch (NotesException e) {

System.out.println("Exception--->" + e.id + " " + e.text);
}
}
}
+Pie Number of slices to send: Send
can someone help me???
My name is Inigo Montoya, you killed my father, prepare to read a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2699 times.
Similar Threads
BufferedReader...
problem in sending mail
SendFailedException with SMTP authentication
Problems with javamail
Accessing Notes NAB from JAVA using Domino Java API
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 15:17:28.