Enable Email Notifications through API

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Posts: 3
Joined: Wed Jan 09, 2013 8:58 am
PostPosted: Mon Aug 19, 2013 7:25 am
I would like to use the Vault API to switch the "Enable Email Notifications" checkbox (under Tools > Options > Notifications in the Vault Client) on and off.
I can't seem to find it in ServerOperations.client.ClientInstance.UserOptions.Options, ServerOperations.client.ClientInstance.UserOptions.LocalOptions or in the Registry under HKey_Current_User.

Where do I access and/or set the settings related to the current user's email notification preferences through the API?

Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear
PostPosted: Mon Aug 19, 2013 10:35 am
There is no straight forward way to do this through the API. You would need to:
a) Retrieve existing notification settings -

b) Using the NotificationCriteriaOptions from step a, instantiate a UpdateNotificationCriteriaOptions object, and set ALL data in this object to the values of NotificationCriteriaOptions, and then add the exception to EmailNotificationEnabled, which would be set to true.

Another option would be to use a SQL Query to set notifications on or off in the Notify database.

Email me at support at sourcegear.com, ATTN: Linda if you'd like a copy of the queries.
Please include a link to this forum post.
Linda Bauer
Technical Support Manager

Return to Questions (API)

Who is online

Users browsing this forum: No registered users and 1 guest