I have a strange issue with a piece of code.
I use
// GET MAILFILE FOR USER
this.getMailFile = function() {
try {
var notesdir:NotesDirectory;
notesdir = session.getDirectory();
return notesdir.getMailInfo(this.strUser, false, false).get(3);
} catch (e) {
return '';
}
}
to get the mailfile for a user. Further on, I try to open the file with the followong line of code:
this.createEntry = function() {
if (this.strSubject == "") return '3';
if (this.strUser == "") return '5';
if (this.getMailFile() == '') return '1';
try {
var db:NotesDatabase = session.getDatabase(this.getMailFileServer(), this.getMailFile(), false);
//var db:NotesDatabase = session.getDatabase('', 'mail\\ukrause.nsf', false);
if (db == null) {
return '2';
} else {
The code throws an exception
Exception
Error while executing JavaScript computed expression
Script interpreter error, line=1, col=32: [TypeError]
Exception occurred calling method NotesSession.getDatabase(string,
string, boolean)
null
First thougt was that it has to do with the backslash and so I used static values for server and file, but same error.
The code successfully runs on another server ( same version )
My maildb has standard ACL settings with default and anonymous set to NoAccess. Server an I are Manager.
What I found so far is that on THIS server getDatabase() only seems to work, when Anonymous has at least reader Access.
So, when I set Anonymous to Reader, getDatabase works.
Anyone to open my eyes? There must be something obvious that I'm missing, but I'm too blind to see.