It's all about the answers!

Ask a question

How to change the default settings in "Mail Configuration" ?

yk wu (461915) | asked Jan 14 '13, 3:30 a.m.
Dear All,

I am working with a customer that wants to change the default settings in "Mail Configuration", somewhat like screen below.

Reason is that customer wants to get email notification for everyone, but only under fewer situations than default. There are many users in RTC, and setting up a new default "Mail Configuration" is needed.

My question is similar to "", unfortunately, there has been no answer so far.

Mail Configuration

Thanks for reading, and suggestions are always welcome.

Accepted answer

permanent link
Ralph Schoon (63.0k33645) | answered Jan 14 '13, 5:35 a.m.

I was not able to find a setting for the mail configuration. Maybe someone has more info.

I was however able to find how the configuration is set in the Java API. It is part of the details of a contributor.
You can access the data using the following code:
		IContributorDetails details = (IContributorDetails) teamRepository
		details = (IContributorDetails) details.getWorkingCopy();
		IContent photo = details.getPhoto();
		String mailconfig = details.getLargeStringExtension("");

You can follow and provided you get the default from an example user, use that to set the default using a commandline.

You might need to go through Hong Kong to get at the blog.

In case of WordPress blogs, you can append the string "" to the blog URL and it should open just fine. For instance, if the main blog is located at, you can access a mirror image of this site from"

We have seen is accessible through Hong Kong.

Sorry, my best solution at the moment.
yk wu selected this answer as the correct answer

Ralph Schoon commented Jan 14 '13, 9:32 a.m. | edited Jan 14 '13, 9:36 a.m.

The code can be found in;

I am not sure the code it uses is a public API.

sam detweiler commented Jun 11 '14, 3:27 p.m.

there is no builtin function to set them a specific way.

I wrote a utility to save/restore them to stop spam during build workitem updates,
it could be modified to set a specific email configuration.
see the answer here

note: it uses internal apis, and as such is subject to impacts from product changes.

2 other answers

permanent link
VK L (8177153159) | answered Feb 03 '15, 5:00 a.m.
Hi All,
I have written a code to update mail format settings - it fails to fetch the contributor details and throuws null exception on the mailconfig retrieval:
*It works after i open the particular user in the editor and perform a save.

user = icm.fetchContributorByUserId(userid, null);
contributorWorkingCopy = (IContributor) user.getWorkingCopy();
icm.saveContributor(contributorWorkingCopy, null);
IContributorDetailsHandle detailsHandle = contributorWorkingCopy.getDetails();
details = (IContributorDetails) iim.fetchCompleteItem(detailsHandle,IItemManager.DEFAULT, null);
details=(IContributorDetails) details.getWorkingCopy();
String mailconfig = details.getLargeStringExtension("");

mailconfig value is retrieved as null.Please advise.

sam detweiler commented Feb 03 '15, 7:17 a.m.

the only thing I can see that is different is that I ask the Item Manager to REFESH

IContributorDetails details=
            (IContributorDetails) iim.fetchPartialItem(detailsHandle, IItemManager.REFRESH, Collections.singleton(IExtensibleItem.ALL_STATE_EXTENSIONS_PROPERTY),null);

permanent link
VK L (8177153159) | answered Feb 03 '15, 7:56 a.m.
Hi sam,
If i open user "a" in the editor, and save it with 0 changes (*just inserting a space and  removing it for example)
update code runs fine for the above case. it fetches mail config and updates.
For all other user ids, it fails to read the mail config via "getlargestringextension" - i tried both default,refresh. The mail config is retrieved as null, other properties of details like mail address,etc have values.

sam detweiler commented Feb 03 '15, 8:01 a.m.

No idea.. my code (linked above) has been working for almost 3 years unchanged without any issue.

Ralph Schoon commented Feb 03 '15, 8:01 a.m.

Please, next time, create a new question, as the one is already closed as answered.
I would suggest to search the SDK for usage of the statement you are not sure how to use. In most cases the examples reviled explain the issue.

Your answer

Register or to post your answer.