0
votes

I am writing a lotus note plugin. I want the lotus notes login user email inside the java client. i.e. the email address that user has used to signed in lotus notes. My lotus notes is configured for a Gmail account i.e. I am using a Gmail account to send a mail using lotus notes.

Here is my work flow:
I have created an Action "my action" just at the side of "send" button inside "Message" form. When i click the "my action" it trigger my JAVA client where i have to get the logged in user email address.

So my question is how to get the login user email?

2

2 Answers

3
votes

try to get value from field INETFrom.

Notice, there is no difference what langauge you use, java, lotusscript, c++, you just need to know name of item where memo stores Internet address. if you have LN client you can check all fields inside of memo using properties, it may help a lot as well.

Btw, in case if the memo was sent from one Domino user to another Domino user inside one domain (and ofc it depends of settings on Domino server) it could be that there is no information inside of memo about Internet address.

If that does not help, try to check all items with this code (that will print out you all items so you will find where there is an email):

Vector items = doc.getItems();
for (int j=0; j<items.size(); j++) {
    Item item = (Item)items.elementAt(j);
    System.out.println(item.getName() + " = " + item.getValueString());
}
0
votes

Since your updated question has now clarified that you are looking for the current logged-in user's email address, and you have specified that the user is a gmail user -- I believe that what you are asking is how to get the user's gmail address. Is that correct? If I'm correct, then I believe the answer will be that you must write some code to read the user's current Location document from his personal address book. To verify if I am on the right track, I suggest the following:

  • In the Notes client, look at the location section at the right of the status bar at the bottom of the window. Take note of the location name (e.g., "Office", "Home", etc.) that appears there.
  • Click on the location section and select "Edit Locations..." from the pop-up menu.
  • In the Select the Locations pane of the Preference dialog, select the name of your location from the list, and click on the Edit button.
  • Click on the Basics tab, and check: Is the address that you want in the field labeled 'Internet mail address'?

Please post the answer to the question in my last bullet point as a new comment. It it is there, then I will continue this answer with further details.

Previous answer:

If the message you are reading is a Notes internal message, from one Notes user to another, then the sender's name is the email address. If the sender is a Notes user in your own domain, and you want his Internet email address, then you have to look it up in the Domino Directory. If you are using Notes/Domino 8 or above, you can use the LookupNames method of the lotus.domino.Directory class for that in your Java code.