LOTUSSCRIPT /COM/OLE のクラス
Sub Initialize 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("Joe Smith", True) Msgbox "Mail Server:" + Cstr(homeserver(0)) Msgbox "Build Number:" + Cstr(homeserver(1)) Msgbox "Domino Version:" + Cstr(homeserver(2)) Msgbox "Mailfile:" + Cstr(homeserver(3)) Msgbox "Short Name:" + Cstr(homeserver(4)) Msgbox "MailDomain:" + Cstr(homeserver(5)) Msgbox "Username:" + Cstr(homeserver(6)) Msgbox "internetMailAddress:" + Cstr(homeserver(7)) Msgbox "Out of Office:" + Cstr(homeserver(8)) End Sub 2. 次の例は、最初のメール情報の取得に失敗した場合、getver フラグを使用してユーザーのメールファイルサーバーに関する部分的な情報を取得します。
Function RetrieveMailInfo() As Integer On Error Goto ErrHandle RetrieveMailInfo = False Me.m_vOwnerMailInfo = Me.m_dirDirectory.GetMailInfo(Me.m_dbOwner, True) If Isempty(Me.m_vOwnerMailInfo) Then Me.m_vOwnerMailInfo = Me.m_dirDirectory.GetMailInfo(Me.m_dbOwner, False) End If End Function