共用方式為


Protocol Element (ADF)

Contains elements that define a delivery protocol used by the notification class to deliver notifications.

語法

<NotificationClasses>
    <NotificationClass>
        ...
        <Protocols>
            <Protocol>

Element Characteristics

Characteristic Description

Data type

None.

Default value

None.

Occurrence

Required once or more per Protocols element.

Updates

Can be added and deleted when updating the application.

Element Relationships

Relationship Elements

Parent element

Protocols Element (ADF)

Child elements

ProtocolName Element (ADF)

Fields Element for Protocol (ADF)

ProtocolExecutionSettings Element (ADF)

備註

The child elements of the Protocol element define a delivery protocol used by the notification class. Each notification class must define at least one delivery protocol to deliver notifications.

The delivery protocol must be associated with a delivery channel in the instance configuration file (ICF). For more information see 定義傳遞通道.

範例

The following example shows how to define an SMTP delivery protocol, and provides values for the fields required to create an SMTP message. (Values surrounded by percent characters (%) are parameters defined either in the ParameterDefaults element or when creating the instance of Notification Services.)

If the initial delivery attempt is unsuccessful, notifications sent using this protocol attempt redelivery 15 minutes after the initial attempt, 30 minutes later, and then one hour later.

<Protocol>
    <ProtocolName>SMTP</ProtocolName>
    <Fields>
        <Field>
            <FieldName>Subject</FieldName>
            <SqlExpression>%SubjectLine%</SqlExpression>
        </Field>
        <Field>
            <FieldName>From</FieldName>
            <SqlExpression>%fromAddress%</SqlExpression>
        </Field>
        <Field>
            <FieldName>To</FieldName>
            <FieldReference>DeviceAddress</FieldReference>
        </Field>
        <Field>
            <FieldName>Priority</FieldName>
            <SqlExpression>%mailPriority%</SqlExpression>
        </Field>
        <Field>
            <FieldName>BodyFormat</FieldName>
            <SqlExpression>&quot;html&quot;</SqlExpression>
        </Field>
    </Fields>
    <ProtocolExecutionSettings>
        <RetrySchedule>
            <RetryDelay>P0DT00H15M00S</RetryDelay>
            <RetryDelay>P0DT00H30M00S</RetryDelay>
            <RetryDelay>P0DT01H00M00S</RetryDelay>
        </RetrySchedule>
    </ProtocolExecutionSettings>
</Protocol>

請參閱

參考

Application Definition File Reference

其他資源

指定傳遞通訊協定名稱與欄位
更新執行個體及應用程式

說明及資訊

取得 SQL Server 2005 協助