Thursday, March 20, 2014

Getting from Domino server

Domino allows to setup up to 10 mail boxes for 1 server. By default it 1 mail box with name however if you increase number of mail boxes to 2 and more Domino will create, ... and you must remember about it.
In order to get mail box without doing lookup to ServerConfig document, just try to initiate first and if it does not exists go for
public Database getMailBox(Session session) throws NotesException{
 String server = session.getServerName();
 Database mailbox = session.getDatabase(server, "");
 if (!mailbox.isOpen()) {
  mailbox = session.getDatabase(server, "");
 return mailbox;
There is topic on how to force Domino to use when multiple mail.boxes are enabled


Anonymous said...

Actually... you can always look for "" on the server. If it does not exist, you will automatically get a handle to, or, or etc. It is random. --Brian

Dmytro said...

hm, odd, case you described did not work for me, but will do double check.

richard fenwick said...

You may need to add a line to the servers notes.ini

Dmytro said...

Hey Richard, thanks for link, I did not know that.