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);
}
}
}