[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Access Lotus Notes mailbox from java application

Posted on 2007-10-02
Medium Priority
Last Modified: 2013-12-18
After lots of searching, I haven't been able to find an answer to this question. What I would like to do is access a shared Lotus Notes (7.0.2) mailbox via a java application in order to extract attachments from all mails that arrive. Firstly is this possible, and second how?

This is the sort of thing I'm trying (just trying to connect to the database, I'll worry about extracting the attachements later)

      Session s = NotesFactory.createSession(<server>, <username>, <password>);
      Database d = s.getDatabase(<server>, <database>);

.. but I get a connection refused message. I am also surprised that the code I have seen makes no reference to an id file, I though I would need this to validate the connection.

Any help greatly appreciated.

Question by:Scoteq
  • 2
LVL 63

Expert Comment

ID: 19998814

Accepted Solution

Scoteq earned 0 total points
ID: 19999276
Thanks for the comments.

I am running the code on the client, in a stand alone application. The key point that I was missing was switching to an id file. For info, the following code works for me:

      Session s = NotesFactory.createSession();
      Registration reg = s.createRegistration();
      String un = reg.switchToID(<id_file>,<password>);
     if (un.equals(""))
                System.out.println("File does not exist or not a user ID");
                System.out.println("User name = " + un);
      Database d = s.getDatabase(<server>, <dbname>);
      if (!d.isOpen()) d.open();
      // Code to read documents and extract files
LVL 63

Expert Comment

ID: 20000219
Glad you resolved this.

Yes, the ID file is critical, since otherwise the Domino Security prevents access.

Glad you resolved this !

Expert Comment

ID: 20029973
Closed, 500 points refunded.
Community Support Moderator

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question