操作说明:启用电子邮件通知How-to: enable email notification

受保护的内容所有者通过电子邮件通知可以在其内容受到访问时收到通知。Email notification allows for a protected content owner to be notified when his or her content is accessed.

若要针对给定许可证设置电子邮件通知,请使用IpcSetLicenseProperty和属性类型参数dwPropID,将其用作ipc _ LI _ 应用特定的 _ _ 数据,并将应用程序数据字段格式化为ipc _ NAME _ 值 _ 列表To setup your email notification for a given license, use IpcSetLicenseProperty with the property type parameter, dwPropID, as IPC_LI_APP_SPECIFIC_DATA and the application data fields formatted as an IPC_NAME_VALUE_LIST.

C + +C++:

int numDataPairs = 3;

IPC_NAME_VALUE propertyValuePairs [numDataPairs];

// lcid field set to 0 causes the default lcid to be used

propertyValuePairs[0] = {"MS.Conetent.Name", 0, "FinancialReport.docx"};
propertyValuePairs[1] = {"MS.Notify.Enabled",0 , "true"};
propertyValuePairs[2] = {"MS.Notify.Culture",0 , "en-US"};

IPC_NAME_VALUE_LIST emailNotificationAppData = {numDataPairs, propertyValuePairs};

result = IpcSetLicenseProperty(licenseHandle, FALSE, IPC_LI_APP_SPECIFIC_DATA, emailNotificationAppData);

下表包含用于 RMS 电子邮件通知的应用程序数据字段、属性名称和值对。The following table contains the application data fields, property name and value pairs, for RMS email notification.

属性名称Property Name 数据类型Data Type 示例值Example Value 注释Notes
MS.Content.NameMS.Content.Name stringstring “FinancialReport.docx”“FinancialReport.docx” 这是与受保护的内容关联的标识符。This is an identifier associated with the protected content.

对于受保护的文件,此值应是文件的名称(不包含任何路径信息)。For protected files this value should be the name of the file without any path information.

对于其他类型的内容(如电子邮件),这可能是电子邮件的主题,也可能为空。For other types of content such as an email message it might be the subject of the email or it might be empty.
MS.Notify.EnabledMS.Notify.Enabled stringstring “true”|“false”“true” | “false” 如果此值设置为“true”,则当有人尝试使用发布许可证来获取最终用户许可证时,会向发布许可证所有者发送通知电子邮件。If this value is set to “true” a notification email will be sent to the owner of the publishing license when someone attempts to use it to obtain an end user license.
MS.Notify.CultureMS.Notify.Culture stringstring “en-US”“en-US” 源: System.Globalization.CultureInfo.CurrentUICulture.NameSource: System.Globalization.CultureInfo.CurrentUICulture.Name

此值用于确定通知电子邮件的本地化语言以及应在电子邮件中使用的日期/时间和数字格式设置。This value is used to determine the localized language of the notification email and the date/time and number formatting that should be used in the email message.

其设置应基于用于创建发布许可证的计算机的用户设置,或基于发布许可证的所有者的首选区域性。It should be set based on user settings of the machine that the publish license is created on, or based on the preferred culture of the owner of the publish license.
MS.Notify.TZIDMS.Notify.TZID stringstring “太平洋标准时间”“Pacific Standard Time” 源: TimeZoneInfo.Local.Id - Windows 时区 ID。Source: TimeZoneInfo.Local.Id - Windows time zone ID.

此值用于描述特定时区及其特征的 Microsoft Windows 操作系统时区标识符。This value is the Microsoft Windows OS time zone identifier describing a particular time zone and its characteristics.
MS.Notify.TZOMS.Notify.TZO stringstring “-480”“-480” 这是发布许可证所有者的时区相对于 UTC 时间在分钟方面的偏移。This is the publish license owner’s time zone offset in terms of minutes from UTC time.

如果提供了有效 TZID 值,则会使用它指定的时区偏移,而忽略此值。If a valid TZID value is provided the offset of the time zone specified by it will be used and this value will be ignored.

此值很可能由基于非 Windows 的发布平台使用,这些平台无权访问 Windows 操作系统时区 ID 值的列表。This value will more than likely be used by non-windows based publishing platforms that do not have access to the list of Windows OS time zone ID values.

如果未提供 TZID 值,则此值用于计算通知消息的时间偏移,而 TZSN 用于(与时区值无关)指示时区的名称。If a TZID value is not provided this value will be used to calculate the time offset in notification messages, and the TZSN will be used (regardless of the time zone value) to indicate the name of the time zone. 这会导致时区固定,不会在夏令时适用时针对夏令时进行更新。This will result time zone being fixed and not updating for daylight savings when it is applicable.

例如:For example:

如果 TXID 为空并且 TZ0 设置为“-420”,而 TZSN 设置为“太平洋标准时间”,则通知电子邮件中显示的所有值都会调整为“太平洋标准时间”,即使夏令时当前已不再生效也会显示为这样。If TXID is blank and TZ0 is set to “-420” and the TZSN is set to “Pacific Daylight Time” all values shown in the notification email will be adjusted to "Pacific Daylight Time” and displayed as such even if daylight savings is no longer in affect currently.

另一方面,如果随 TZSN 和 TZDN 一起提供了 TZID,则通知电子邮件中指定的时间会基于日期和时间应以夏令时模式还是标准模式来显示而进行调整和显示。On the other hand if a TZID is supplied along with both TZSN and TZDN, then the times specified in the notification email will be adjusted and displayed based on whether the date and time should be displayed in Daylight mode or Standard mode.
MS.Notify.TZSNMS.Notify.TZSN stringstring “太平洋标准时间”“Pacific Standard Time” 源: TimeZoneInfo.Local.StandardName - 标准时区名称。Source: TimeZoneInfo.Local.StandardName - Standard Time Zone name.

这应是时区标准时区名称的本地化名称。This should the localized name of the time zone’s standard time zone name.
MS.Notify.TZDNMS.Notify.TZDN stringstring “太平洋夏令时”“Pacific Daylight Time” 源: TimeZoneInfo.Local.DaylightName - 夏令时时区名称。Source: TimeZoneInfo.Local.DaylightName - Daylight Time Zone name.

这应是时区夏令时名称的本地化名称。This should be the localized name of the time zone’s daylight savings name. 如果时区不支持夏令时,则它可能与标准名称相同。It can be the same as the standard name if the time zone does not support daylight savings.