Office.MailboxEvent interface

MailboxEvent オブジェクトはスマート アラート統合されたスパム報告機能、暗号化解除などイベント ベースのアクティベーションを実装するアドインのイベント ハンドラーとして渡されます暗号化解除。 これにより、アドインは、イベントの処理が完了したことを Outlook クライアントに通知できます。

注釈

API セット: メールボックス 1.10

最小アクセス許可レベル: 制限付き

適用可能な Outlook モード: Composeまたは読み取り

重要:

メソッド

completed(options)

イベント ベース アドイン、スパム報告アドイン、または暗号化解除アドインがイベントの処理を完了したことを示します。

メソッドの詳細

completed(options)

イベント ベース アドイン、スパム報告アドイン、または暗号化解除アドインがイベントの処理を完了したことを示します。

completed(options?: SmartAlertsEventCompletedOptions | SpamReportingEventCompletedOptions | MessageDecryptEventCompletedOptions): void;

パラメーター

options

Office.SmartAlertsEventCompletedOptions | Office.SpamReportingEventCompletedOptions | Office.MessageDecryptEventCompletedOptions

省略可能。 イベント ベースのアドイン、スパム報告アドイン、または暗号化解除アドインがイベントの処理を完了したときの動作を指定するオブジェクト。

返品

void

注釈

API セット: メールボックス 1.10

最小アクセス許可レベル: 制限付き

適用可能な Outlook モード: Composeまたは読み取り

重要:

  • 統合されたスパム報告機能のサポートは、メールボックス 1.14 で導入されました。

  • options パラメーターに SmartAlertsEventCompletedOptions オブジェクトを割り当てるサポートは、メールボックス 1.12 で導入されました。

  • 暗号化解除機能のサポートは、メールボックス 1.16 で導入されました。

// The following example sets the subject when a new message is composed.
function onNewMessageComposeHandler(event) {
    const subject = "Set by an event-based add-in!";
    Office.context.mailbox.item.subject.setAsync(
        subject,
        {
            asyncContext: event,
        },
        (asyncResult) => {
            const event = asyncResult.asyncContext;
            if (asyncResult.status === Office.AsyncResultStatus.Failed) {
                console.error("Failed to set subject: " + asyncResult.error.message);
                event.completed();
                return;
            }

            // Signal to the Outlook client that the event has been processed.
            console.log("Successfully set the subject.");
            event.completed();
        }
    );
}