Click or drag to resize

ISiteGetEmailTemplate Method


Retrieves the email template for a specific User.

Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
Syntax
XDocument GetEmailTemplate(
	IUser user,
	string templateFileName
)

Parameters

user  IUser
The User to retrieve email template for. This determines which language the form of the email template to bring back
templateFileName  String
The xml file name of the template, name with extension only

Return Value

XDocument
The email template as XML document, in the language that the User can read or write
Remarks

All email templates are stored at "App_Data/xml/custom/emailNotifications" folder, grouped by Locale region codes.

Example
The English version of Workflow Notification Email Template is at "App_Data\xml\Custom\emailNotifications\en-us\workflowNotifications.xml".

The default language to use is alway "en-us". So if the User is null, or the User can read or write in "en-us", the "en-us" version will be returned.

If User cannot read or write in "en-us", but there no languages for what this User can read or write, then "en-us" version is still used. If the "en-us" version of template file doesn't exist, we will assume this is a Workflow Email to use the embedded Workflow Email Template, that is written in English.

See Also