How to get email address from Lotus User ID with Visual Basic

90 pts.
Tags:
Lotus development
Lotus Notes
Lotus Notes 6.x
Lotus Notes interoperability
Lotus Notes User ID
Visual Basic
I am writing a meeting invitation program in Visual Basic. I have lotus notes User ID but I need email address, how to get email address using userid. If you need any more information please let me know.

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can’t get it from the physical ID. The ID file has zero to do with the email address. The email address is set in the Domino Directory. I assume you want the SMTP address, no? That’s a field in the directory called “InternetAddress”. It’s unique to each person doc.

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Subbu2k9
    Hi Mblazar, Sorry for my late reply. I have user id like 'TATAS' and I need get my email address 'subbu.tata@xxx.com' I am trying to convert following .Net code to my VBA code but it is not working: %INCLUDE "lsxsd.lss" Dim session As NotesSession Dim db As NotesDatabase Dim vw As NotesView Dim doc As NotesDocument Public Class GetUserInfo Sub New Set s = New NotesSession Set db = s.CurrentDatabase Set vw = db.GetView("(PeopleLookup)") 'This line not working in VBA for me End Sub Public Function GetPhoneNumber(uName As String) As String Set doc = vw.GetDocumentByKey(uName) If Not (doc Is Nothing) Then GetPhoneNumber = doc.GetItemValue("OfficePhoneNumber")(0) Else GetPhoneNumber = "" End If End Function End Class In the above code GetPhoneNumber function will take persons user id and returns his Office phone number. But GetView("(PeopleLookUp)") not working for me. If you have any other idea can you share with me. Thanks Subbu.
    90 pointsBadges:
    report
  • Ledlincoln
    Subbu, I think you are misusing the term "user ID." It sounds like you have the user's
      name
    , and want to look up their email address. You kind of answer your own question - your database apparently does not have a view called "(PeopleLookup)". Does your code reside in a public address book?
    1,620 pointsBadges:
    report
  • Subbu2k9
    Ledlincoln, You might correct, I have user name and I need email address for the same. I am writing this vba program in my local MS Access module. I dont know what is public address book. If peoplelookup view is not there then how to know what are all views available in my database? Correct me if I am wrong: Is it possible get email address using username? Thanks for quick reply again.
    90 pointsBadges:
    report
  • Ledlincoln
    I can't help you on accessing the Lotus Domino address book using VBA. It can probably be done, but you should probably enlist the help of your Notes admin and design staff. The public address book is typically called "names.nsf" and the view you want might be "($Users)". Have you considered LDAP? Domino runs that service by default, and that might be an easier way to get the job done.
    1,620 pointsBadges:
    report
  • Subbu2k9
    Thanks for your reply. I got success till accessing ($Users) view from names.nsf and i found following itemnames. (I thinking itemnames are column names) $38 $23 FullName ListName Members MailServer MailFile MailDomain MailAddress ShortName Location EncryptIncomingMail CalendarDomain NetUserName HTTPPassword CertificateThumbprint InternetAddress NewMailServer NewMailFile AltFullName MessageStorage ServerName AltFullNameLanguage $QuickPlace SametimeServer Type MailSystem $AdminpOldWebName HTTPPasswordChangeDate HTTPPasswordForceChange Policy My question is how to get values of InternetAddress in ($Users) view. Thanks.
    90 pointsBadges:
    report
  • Subbu2k9
    Finally I got it. I used .GetDocumentByKey() method to get records. My sincere thanks to Mblazar and Ledlincoln, you guide me in right direction. (Users view name). Here is my code: set doc = view.GetDocumentByKey("Key", True) ' key is my username / lastname msgbox doc.GetItemValue("InternetAddress")(0) 'For Email Address set doc = Nothing set view = Nothing.
    90 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following