lotus-noteslotusscriptdomino-designer-eclipse

How to access current logged in user email address in lotus script?


I am looking to find the email address of the current notes client user who is logged in programmatically. Is there a way to do it ? I am accessing username with session but I need email address Thanks in advance.


Solution

  • From the Help database, part of an example for the getMailInfo method:

    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim mynotesdir As NotesDirectory
    Set mynotesdir  = session.getDirectory("server name")    
    Dim homeserver As Variant
    
    homeserver =  mynotesdir.GetMailInfo(session.UserName, True) ' or EffectiveUserName
    Msgbox "internetMailAddress: " + Cstr(homeserver(7))