Solved

How do I Find the Username of a Mailbox other than my own in LotusScript

Posted on 2004-04-12
4
251 Views
Last Modified: 2013-12-18
Hello,
  I have written a Public shared Agent that exports selected E-Mails for a given user to a file for Optical storage.  One of the fields used to identify the document in storage is the User's Name.  I currently get the Username from the property "CommonUserName" from the Current Session.  This works fine while users are archiving there own E-Mails, but it creates a problem when users Archive E-Mails on some else’s behalf.  When I run my script on another users Mailbox from my notes session the E-Mails are identified as being mine instead of the proper user.  This is a problem for the secretaries at my location for the do the Archiving for the Bosses.
  So ultimately what I'm asking is how do you determine in LotusScript the Username on a specific Mailbox, not on a Specific Session?
0
Comment
Question by:Alford-Miller
  • 3
4 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10806534
The Calendar profile of the mail db has the correct username.

~Hemanth
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 500 total points
ID: 10806578
Here is the function to obtain the owner name of the mail file

      Dim s As  New notessession
      Dim db As notesdatabase
      Dim doc As notesdocument
      Set db=s.currentdatabase
      Set doc=db.getprofiledocument("CalendarProfile")
      If  doc.owner(0)<>""  Then  
            OwnerName=doc.owner(0)
      End If

0
 

Author Comment

by:Alford-Miller
ID: 10807679
Hello HemanthaKumar,
  I tried your script and I noticed in the debugger that the db.Title was the same as the Mailbox Name.  I think I will use that instead unless there is a problem of reliablity.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10807717
That is not true if the user renames the title. I would say it is a risk on your part to rely on the piece of information that is easily changed by user.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question