Office.MailboxEnums.MoveSpamItemTo enum

Указывает папку, в которую передается сообщение о нежелательной почте или фишинговое сообщение после его обработки надстройкой, сообщающей о спаме.

Дополнительные сведения о встроенной функции создания отчетов о нежелательной почте см. в статье Реализация интегрированной надстройки для создания отчетов о нежелательной почте.

Комментарии

[ Набор API: Почтовый ящик 1.14 ]

Применимый режим Outlook: чтение сообщений

Важно! Это перечисление можно использовать только для назначения значений свойству moveItemTo метода event.completed . Если вы используете версию Outlook для Windows, которая поддерживает postProcessingAction только свойство, необходимо назначить ему другие строковые значения. Список поддерживаемых строковых значений см. в статье 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"

Указывает, что сообщение перемещается в папку Нежелательная Email почтового ящика.

NoMove = "noMove"

Указывает, что сообщение остается в текущей папке почтового ящика.