Welcome to the Jazz Community Forum
Retrieving mail id of a contributor using Java API from work item

Accepted answer

Hi,
you can obtain this information from an IContributor object using getEmailAddress() method.
From a work item you only have to retrieve the contributor (I suppose from the author or the owner) as a IContributorHandle and then retrive the object using the IItemManager.
Best regards,
Michele.
Comments

Thanks Michele,
I am creating server side plug-in, used below code to retrieve. But IItemManager & getEmailAddress is not resolving, Any specific package i have to import?
IContributorHandle createor = workItem.getCreator();
IItemManager mid = createor.getEmailAddress();

On server side you have to use IRepositoryItemService instead of IItemManager (which is used by plain api, not sdk).
IRepositoryItemService itemService = getService(IRepositoryItemService.class);
IContributorHandle creatorH = workItem.getCreator();
IContributor creator = (IContributor)itemService.fetchItem(creatorH,IRepositoryItemService.COMPLETE);
creator.getEmailAddress();
You have also to set IRepositoryItemService as prerequired service. Is not so simple if you have not develop other stuff on RTC server side. I suggest you to take a look to the SDK wiki page (the examples on follow-up and advisor creation).

Thanks a lot Michele, its working fine.