VB.Net: use session / password of running notes client

Hello evybody,

I want to send e-mail through a VB.NET application and i used COM and a code sample to do so like:

Set noSession = CreateObject(“Notes.NotesSession”)

Set noDatabase = noSession.GETDATABASE(“”, “”)

If noDatabase.IsOpen = False Then noDatabase.OPENMAIL

doing so, if there is a notes client already running, it does not ask for the notes password but uses the running client. However, it does not work on some PCs or maybe some users (i cannot open the mail database in this way)

So I tryed to use the alternative way setting a reference before to domino interop dll:

Dim s As New NotesSession

s.Initialize()

Dim dir As Object = s.GetDbDirectory(“”)

Dim db As Object = dir.OpenMailDatabase()

This works fine - but i have to provide the password (i know i can pass it during inizialize).

Is there a way to use also the session of the current notes client - so not type the password again and not store the password somewhere, OR somebody has an idea why the first way does not work for some users?

Its a little hard to debug, because on my PC it works - the problem is that the mail database seems not to open (in the first version) -

after the line “noDatabase.OPENMAIL” the noDatabase.IsOpen is still false, but without rising an exception…

thanks for any help!