update_email_template

The update_email_template function is used to update the custom letter template.

Copied!
svc=resource/update_email_template&params={"resourceId":<uint>,
				 				 	   "subject":"<text>",			     
				 				 	   "body":"<text>",
	                                   "flags":<uint>}

Parameters

Name Description
resourceId The resource ID of the user.
subject Email subject.
body Email body.
flags Use the default template:
  • 0 — yes;
  • 1 — no.

The following variables can be used in the subject and body text:

Name Description
%JOB_NOTIFICATION% The name of the job or notification.
%ITEM% The name of the item in the report.
%TEMPLATE% The name of the report template.
%DATE_TIME% Date and time.
%LINK% The link to download the report.

Returned result

Copied!
{"error":0}		/* if the execution is successful */

Possible error codes:

Code Description
7 Failed to fetch the item with the desired ACL (ADF_ACL_ITEM_VIEW_PROPERTIES and ADF_ACL_ITEM_EDIT_OTHER).
6 Failed to update the email template.
4 Wrong input parameters.

If you find a mistake in the text, please select it and press Ctrl+Enter.