Interface representing the message context object.

interface MessageContextObject {
    AddTokens: ((obj: any) => MessageContextObject);
    AppendAttachment: ((fileInstance: FileInstance) => MessageContextObject);
    GetBccEmailAddresses: (() => string);
    GetToEmail: (() => string);
    SetBccEmailAddress: ((messageTemplateName: string) => MessageContextObject);
    SetBody: ((body: string) => MessageContextObject);
    SetEmailAccountId: ((emailAccountId: number) => MessageContextObject);
    SetLanguageId: ((languageId: number) => MessageContextObject);
    SetSubject: ((subject: string) => MessageContextObject);
    SetToEmail: ((email: string) => MessageContextObject);
    SetToName: ((toName: string) => MessageContextObject);
    Tokens: MessageTokenBuilderObject;
    UseTemplate: ((messageTemplateName: string) => MessageContextObject);
}

Properties

AddTokens: ((obj: any) => MessageContextObject)

Adds tokens to the message context object.

Type declaration

AppendAttachment: ((fileInstance: FileInstance) => MessageContextObject)

Appends an attachment to the message.

Type declaration

GetBccEmailAddresses: (() => string)

Retrieves the BCC email addresses configured for the message.

Type declaration

    • (): string
    • Returns string

      The BCC email addresses as a string.

GetToEmail: (() => string)

Retrieves the recipient's email address.

Type declaration

    • (): string
    • Returns string

      The recipient's email address as a string.

SetBccEmailAddress: ((messageTemplateName: string) => MessageContextObject)

Sets the BCC email address for the message.

Type declaration

    • (messageTemplateName): MessageContextObject
    • Parameters

      • messageTemplateName: string

        The name of the message template to set BCC for.

      Returns MessageContextObject

      The updated message context object with the BCC email address set.

SetBody: ((body: string) => MessageContextObject)

Sets the body content of the message.

Type declaration

SetEmailAccountId: ((emailAccountId: number) => MessageContextObject)

Sets the email account ID for sending the message.

Type declaration

    • (emailAccountId): MessageContextObject
    • Parameters

      • emailAccountId: number

        The ID of the email account to use.

      Returns MessageContextObject

      The updated message context object with the email account ID set.

SetLanguageId: ((languageId: number) => MessageContextObject)

Sets the language ID for the message.

Type declaration

SetSubject: ((subject: string) => MessageContextObject)

Sets the subject of the message.

Type declaration

SetToEmail: ((email: string) => MessageContextObject)

Sets the recipient's email address.

Type declaration

SetToName: ((toName: string) => MessageContextObject)

Sets the recipient's name.

Type declaration

Builder object for managing message tokens.

UseTemplate: ((messageTemplateName: string) => MessageContextObject)

Sets the message body using a template identified by its name.

Type declaration

    • (messageTemplateName): MessageContextObject
    • Parameters

      • messageTemplateName: string

        The name of the message template to use.

      Returns MessageContextObject

      The updated message context object with the template applied to the body.