Office.MailboxEnums.MoveSpamItemTo enum

報告されたスパムまたはフィッシング メッセージが、スパム報告アドインによって処理された後、移動先のフォルダーを指定します。

統合されたスパム報告機能の詳細については、「統合されたスパム報告アドインを実装する」を参照してください

注釈

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

適用可能な Outlook モード: メッセージの読み取り

重要: この列挙型は、event.completed メソッドの moveItemTo プロパティに値を割り当てるためにのみ使用できます。 postProcessingAction プロパティのみをサポートする Windows バージョンの Outlook を使用している場合は、別の文字列値を割り当てる必要があります。 サポートされている文字列値の一覧については、「 Office.SpamReportingEventCompletedOptions.postProcessingAction」を参照してください。

使用元

// The following example handles a SpamReporting event to process a reported spam or phishing message.
function onSpamReport(event) {
    // Get the Base64-encoded EML format of a reported message.
    Office.context.mailbox.item.getAsFileAsync({ asyncContext: event }, (asyncResult) => {
        if (asyncResult.status === Office.AsyncResultStatus.Failed) {
            console.log(`Error encountered during message processing: ${asyncResult.error.message}`);
            return;
        }

        // Run additional processing operations here.

        /**
         * Signal that the spam-reporting event has completed processing.
         * It then moves the reported message to a custom mailbox folder named "Reported Messages"
         * and shows a post-processing dialog to the user.
         * If an error occurs while the message is being processed, the `onErrorDeleteItem`
         * property determines whether the message will be deleted.
         */
        const event = asyncResult.asyncContext;
        event.completed({
            moveItemTo: Office.MailboxEnums.MoveSpamItemTo.CustomFolder,
            folderName: "Reported Messages",
            onErrorDeleteItem: true,
            showPostProcessingDialog: {
                title: "Contoso Spam Reporting",
                description: "Thank you for reporting this message.",
            },
        });
    });
}

フィールド

CustomFolder = "customFolder"

報告されたメッセージをメールボックス内のカスタム フォルダーに移動することを指定します。

DeletedItemsFolder = "deletedItemsFolder"

報告されたメッセージをメールボックスの [削除済みアイテム ] フォルダーに移動するように指定します。

JunkFolder = "junkFolder"

報告されたメッセージをメールボックスの [Junk Email] フォルダーに移動することを指定します。

NoMove = "noMove"

報告されたメッセージがメールボックスの現在のフォルダーに残ることを指定します。