Kony Management API Guide: App Management EMM JS APIs > Email Policy API

Email Policy API

The 'Email Policy API ' helps a developer to enable or disable email from within an app.

com.kony.iemm.app.setEmailPolicy

This method sets Email policy defined by a developer to an app. This will overwrite Email policy if that is already set from the server.

Signature

JavaScript:com.kony.iemm.app.setEmailPolicy(allow,emailsordomains);

Input Parameters

Variable Name allow
Presence Mandatory
Type Boolean
Values

True - allow app to send emails to specified email id or domain.

False - restrict app from sending emails to specified email id or domain.

 

Variable Name emailsordomains
Presence Mandatory
Type String Array
Values Set of email or domains in string array

Result Values

Int

Result Codes

Code Description
200 SUCCESS
300 NULL_OR_EMPTY_DATA
400 FEATURE_NOT_SUPPORTED
500 FAILURE
600

APP_CONTEXT_NULL_ERRORCODE (android)

700 PACKAGE_NULL_ERRORCODE(android)

com.kony.iemm.app.clearEmailPolicy

This method clears Email policy set by a developer. Once the policy is cleared, the server defined Email policy will be applied to an app if any.

Signature

JavaScript:com.kony.iemm.app.clearEmailPolicy();

Input Parameters

Result Values

Int

Result Codes

Code Description
200 SUCCESS
500 FAILURE
400 FEATURE_NOT_SUPPORTED
600

APP_CONTEXT_NULL_ERRORCODE (android)

700 PACKAGE_NULL_ERRORCODE(android)
Copyright © 2017 Kony, Inc. All rights reserved.