Method CreateMailTemplate
CreateMailTemplate(String, MailTemplateContract)
Create a mail template
Declaration
string CreateMailTemplate(string connectionId, MailTemplateContract mailTemplate)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
MailTemplateContract | mailTemplate | MailTemplate to create |
Returns
Type | Description |
---|---|
System.String | Created mail template id |
Examples
POST http://YourServerName/InfoShare/Json/Common/CreateMailTemplate
Example for create a mail template.{
"connectionId": "eb5718e6-8fd6-460b-9da3-4fb0434e81a8",
"mailTemplate": {
"BodyIsHtml": true,
"Subject": "Mail template test",
"Name": {
"Values": [{
"Text": "Mail template test",
"Culture": "de" }, {
"Text": "Mail template test",
"Culture": "en" }, {
"Text": "Mail template test",
"Culture": "fr" }] },
"Body": "The new Verification code from;%Username%;%VerificationCode%" }
}
Response:
{
"CreateMailTemplateResult": "6dab65c0-eee0-e911-a94b-00155d290a08"
}
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |
ServiceException | Name is not unique for culture ({culture}): {name} (10066) |
ServiceException | Object with id {id} already exists (10078) |
ServiceException | The administrative context {administrativeContext} is already checked out by user {displayLoginName} (10129) |
ServiceException | Verification code is needed: Verification code not yet verified (10152) |