邮件发送事件

当 Mautic 向联系人发送电子邮件时触发。

事件类型

mautic.email_on_send

事件属性

Key

Type

Description

email

object

Email 对象

contact

object

Contact 对象

tokens

object

联系人的个性化标记及其值的键/值对。

contentHash

string

标识唯一的电子邮件内容,包括模板。

idHash

string

对于发送给联系人的特定电子邮件唯一。

content

string

发送到联系人的 HTML 内容。

subject

string

发送到联系人的电子邮件的渲染主题。

source

array

发送电子邮件的组件。 键 0 是组件,如果适用,键 1 是 ID。 例如,如果活动发送了电子邮件,则此值为 ['campaign.event', 1],这意味着活动事件 ID 1 发送了电子邮件。

headers

object

发送到联系人的电子邮件上设置的键/值对。

timestamp

string

事件发生的日期/时间,格式为 ISO 8601。

Email 属性

    • Key
      • Type

      • Description

        • id

        • int

        • ID of the Email

        • isPublished

        • boolean

        • Published state of the Email.

        • dateAdded

        • string

        • Date/time of Email creation in ISO 8601 format.

        • createdBy

        • int|null

        • The ID of the User who created the Email.

        • createdByUser

        • string|null

        • Name of the User that created the Email.

        • dateModified

        • string|null

        • Date/time the Email was last modified in ISO 8601 format or null if not modified.

        • modifiedBy

        • int|null

        • The ID of the User who last modified the Email or null if not modified.

        • modifiedByUser

        • string|null

        • Name of the User that last modified the Email if applicable. Otherwise null.

        • name

        • string

        • Internal name of the Email.

        • subject

        • string

        • Subject of the Email.

        • language

        • string

        • Locale for the Email content.

        • fromAddress

        • string|null

        • A custom from address if configured.

        • fromName

        • string|null

        • A custom from name if configured.

        • replyToAddress

        • string|null

        • A custom reply to address if configured.

        • useOwnerAsMailer

        • boolean

        • TRUE if a Contact’s Owner should the Email’s from address and name.

        • customHtml

        • string

        • HTML template for the Email.

        • plainText

        • string|null

        • Plain text for the Email.

        • template

        • string

        • The Mautic Theme used as the originating content.

        • emailType

        • string

        • Type of Email. Options are template and list - broadcast.

        • readCount

        • int

        • The number of opens for the Email.

        • sentCount

        • int

        • The number of sends for the Email.

        • revision

        • int

        • The number of edits for the Email.

        • dynamicContent

        • object[]

        • Array of objects that contain the Dynamic Content configured as tokens for the Email.

        • utmTags

        • object

        • Key/value pairs of UTM Tags as keys. Mautic supports the following keys: utmSource, utmMedium, utmCampaign, and utmContent. Values are strings or null.

        • publishUp

        • string|null

        • Date/time for publishing the Email in ISO 8601 format. null to consider the Email published if now is before publishDown, if applicable.

        • publishDown

        • string|null

        • Date/time for unpublishing the Email in ISO 8601 format. null to consider the Email published if now is after publishUp, if applicable.

        • variantStartDate

        • string|null

        • Date/time the Email started to track A/B test statistics. null if the Email isn’t part of an A/B test.

        • variantSentCount

        • int

        • The number of times sent since the last edit to an A/B test Email.

        • variantReadCount

        • int

        • The number of times read since the last edit to an A/B test Email.

        • variantParent

        • object|null

        • Email object. The A test for an Email configured as an A/B test.

        • variantChildren

        • array

        • Array of Email objects. The B, C, D, and so forth tests for an Email configured as an A/B test.

        • translationParent

        • object|null

        • Email object. The main translation of an Email configured to be a translation of another.

        • translationChildren

        • array

        • Array of Email objects. The translations of an Email configured to be a translation of another.

        • headers

        • array

        • Key/value pairs of header templates configured for the Email.

Category properties

Key

Type

Description

id

int

分类的 ID。

title

string

分类的标题。

alias

string

分类在 API 中的名称。

description

string

分类的描述。

color

string

分类配置的颜色的十六进制代码。

bundle

string

分类适用的组件或频道。也可以是 global

createdByUser

string

创建分类的用户名称。

modifiedByUser

string|null

最后更新分类的用户的名称。如果未修改,则为 Null。

Asset properties

Key

Type

Description

id

int

资源的 ID。

title

string

资源的标题。

alias

string

资源在 API 中的名称。

description

string

资源的描述。

category

object

分类对象

revision

int

资源的编辑次数。

language

string

资源的配置区域设置。

storageLocation

string

如果是上传的文件,则为 local;如果存储在其他位置,则为 remote,URL 可通过 downloadUrl 获取。

downloadUrl

string|null

如果 storageLocationremote,则为资源的 URL。如果是本地存储,则为 null

extension

string

资源的文件扩展名。

mime

string

资源的文件类型。

size

int

文件的字节大小。

downloadCount

int

资源的下载总次数。

uniqueDownloadCount

int

下载过该资源的联系人的数量。

disallow

boolean

如果为 TRUE,则表示机器人可以访问并索引该资源;否则为 FALSE。仅适用于本地资源。

Segment properties

    • Key
      • Type

      • Description

        • id

        • int

        • ID of the Segment.

        • name

        • string

        • Name of the Segment.

        • publicName

        • string

        • Name displayed in the Preference Center if isGlobal and isPreferenceCenter are TRUE.

        • alias

        • string

        • API name of the Segment.

        • description

        • string

        • Description of the Segment.

        • createdByUser

        • string

        • The name of the User that created the Segment.

        • modifiedByUser

        • string|null

        • The name of the User that last modified the Segment. null if never modified.

        • isGlobal

        • boolean

        • TRUE if configured to be a Public Segment. FALSE otherwise.

        • isPreferenceCenter

        • boolean

        • TRUE if configured to display in the Preference Center for Contact Segments. FALSE otherwise.

Segment filter properties

Key

Type

Description

glue

string

Notes how the filter relates to the filter before it. Options are and or or. and groups the filter with the previous filters. or starts a new group.

field

string

The field type for the filter. For example, it could be a custom field filter such as email. Or it could be a behavioral based filter such as lead_asset_download.

object

string

Object the filter’s data belongs to. Currently supported values are lead for Contact and company.

type

string

The filter’s field type that corresponds with the underlying data. Current options are boolean, date, datetime, email, country, locale, number, tel, region, select, multiselect, text, textarea, time, timezone, and url.

filter

mixed

The value of the filter.

display

mixed

Value that displays in the UI for a lookup type field. For example, display may be a User’s name where filter is the ID of the User.

operator

string

The comparison operator for the filter. Available values vary based on what the filter supports and includes =, !=, gt, gte, lt, lte, like, !like, startsWith, endsWith, contains, empty, !empty, in, !in, and regexp, !regexp.

Unsubscribe Form properties

    • Key
      • Type

      • Description

        • id

        • int

        • Form 的 ID。

        • name

        • string

        • Form 的标题。

        • alias

        • string

        • Form 的 API 名称。

        • description

        • string

        • Form 的描述。

        • createdByUser

        • string

        • 创建 Form 的用户的姓名。

        • modifiedByUser

        • string|null

        • 最后更新 Form 的用户的姓名。如果未修改,则为 null。

        • publishUp

        • string|null

        • 以 ISO 8601 格式表示的发布 Form 的日期/时间。如果现在的时间早于 publishDown`(如果适用),则将视为已发布的 Form,值为 `null

        • publishDown

        • string|null

        • 以 ISO 8601 格式表示的取消发布 Form 的日期/时间。如果现在的时间晚于 publishUp`(如果适用),则将视为已发布的 Form,值为 `null

        • cachedHtml

        • string

        • Form 的缓存渲染 HTML。

        • template

        • string|null

        • 用于设置预览页面样式或自定义表单字段的自定义 Mautic 主题。请参阅 Customizing Forms

        • formType

        • string

        • 已弃用。 以前指示 Form 是否为独立表单或活动。从 Mautic 7.1 开始,所有 Form 的功能都相同。Mautic 8.0 将安排删除此属性。

        • postAction

        • string

        • 指示提交后 Form 的行为。当前支持的值包括 returnredirectmessage

        • postActionProperty

        • string|null

        • 如果 postActionredirect,则为重定向到联系人的 URL;如果 postActionmessage,则为显示给联系人的消息。

        • inKioskMode

        • boolean

        • 如果 Mautic 已禁用跟踪的联系人设置 Cookie,则为 TRUE

        • renderStyle

        • boolean

        • 如果设置为 TRUE,则会从配置的 template 中渲染 CSS 样式。

        • noIndex

        • boolean

        • 如果设置为 TRUE,则会要求搜索引擎不跟踪 Form 的预览页面。

        • formAttributes

        • string|null

        • 添加到 <form> 标签的 HTML 属性。

Unsubscribe Form field properties

    • Key
      • Type

      • Description

        • id

        • int

        • 表单字段的 ID。

        • alias

        • string

        • 表单字段的 API 名称。

        • label

        • string

        • 表单字段的标签。

        • showLabel

        • boolean

        • 如果设置为 TRUE,则在表单的 HTML 中显示标签。

        • type

        • string

        • 表单字段的类型。例如,email

        • defaultValue

        • mixed

        • 表单字段的默认值。

        • isRequired

        • boolean

        • 如果为必填项,则设置为 TRUE

        • validationMessage

        • string|null

        • 如果是必填字段且为空时显示的提示信息。

        • helpMessage

        • string|null

        • 在表单的 HTML 中显示的用于指导用户填写该字段的信息。

        • order

        • int

        • 表单字段在表单字段排序中的位置。

        • properties

        • object

        • 特定于表单字段类型的属性集合。

        • labelAttributes

        • string|null

        • 要附加到字段标签元素的 HTML 属性。

        • inputAttributes

        • string|null

        • 要附加到字段输入元素的 HTML 属性。

        • containerAttributes

        • string|null

        • 要附加到字段的包装元素的 HTML 属性。

        • leadField

        • string|null

        • 用于将数据持久化到联系人自定义字段中的字段,当提交表单时使用。

        • saveResult

        • boolean

        • 如果设置为 FALSE,则阻止将值持久化到数据库。

        • isAutoFill

        • boolean

        • 如果设置为 TRUE,则自动填充从跟踪的联系人的个人资料中已知的值。

Unsubscribe Form action properties

Key

Type

Description

id

int

表单的 ID。

name

string

表单操作的名称。

description

string

表单操作的描述。

type

string

表单操作的 API 名称。例如,lead.scorecontactscompanies

order

int

表单操作在执行顺序中的位置。

properties

object

特定于表单操作类型的属性集合。