Office.SpamReportingEventArgs interface

Provides information about the Office.EventType.SpamReporting event that occurs when an unsolicited message is reported.

Remarks

[ API set: Mailbox 1.14 ]

Examples

// This example handles a SpamReporting event to process a reported spam or phishing message.
function onSpamReport(event) {
    if (event.type === "SpamReporting") {
        const reportedOptions = event.options;
        const additionalInfo = event.freeText;

        // Run additional processing operations here.

        // Signal that the event has completed processing.
        event.completed({
            moveItemTo: Office.MailboxEnums.MoveSpamItemTo.CustomFolder,
            folderName: "Reported Messages",
            onErrorDeleteItem: true,
            showPostProcessingDialog: {
                title: "Contoso Spam Reporting",
                description: "Thank you for reporting this message."
            }
        });
    }
}

Properties

freeText

The text provided by the user in the preprocessing dialog of a spam-reporting add-in.

options

Returns true for each reporting option selected by the user in the preprocessing dialog of a spam-reporting add-in.

type

The type of event that was raised. For details, see Office.EventType.

Property Details

freeText

The text provided by the user in the preprocessing dialog of a spam-reporting add-in.

freeText: string;

Property Value

string

Remarks

[ API set: Mailbox 1.14 ]

To add an optional text box to the preprocessing dialog of your spam-reporting add-in, you must configure the FreeTextLabel element in the manifest of your add-in.

To learn more about how to develop a spam-reporting add-in, see Implement an integrated spam-reporting add-in.

options

Returns true for each reporting option selected by the user in the preprocessing dialog of a spam-reporting add-in.

options: boolean[];

Property Value

boolean[]

Remarks

[ API set: Mailbox 1.14 ]

The order of the booleans in the array corresponds to the order of the reporting options specified in the ReportingOptions element of your add-in's manifest.

To learn more about how to develop a spam-reporting add-in, see Implement an integrated spam-reporting add-in.

type

The type of event that was raised. For details, see Office.EventType.

type: "SpamReporting";

Property Value

"SpamReporting"

Remarks

[ API set: Mailbox 1.14 ]