Office.DecryptedMessageBody interface

Stellt den Text einer entschlüsselten Nachricht dar.

Hinweise

API-Satz: Postfach 1.16

Minimale Berechtigungsstufe: Element lesen/schreiben

Anwendbarer Outlook-Modus: Lesen von Nachrichten

Informationen zum Entwickeln eines Verschlüsselungs-Add-Ins in Outlook finden Sie unter Erstellen eines Outlook-Verschlüsselungs-Add-Ins.

Verwendet von

Beispiele

// This sample handles the OnMessageDecrypt event to decrypt the body and attachments of a message.
function onMessageDecryptHandler(event) {
    // Your code to decrypt the contents of a message would appear here.
    ...

    // Use the results from your decryption process to display the decrypted contents of the message body and attachments.
    const decryptedBodyContent = "<p>Please find attached the recent report and its supporting documentation.</p>";
    const decryptedBody = {
        coercionType: Office.CoercionType.Html,
        content: decryptedBodyContent
    };

    // Decrypted content and properties of a file attachment.
    const decryptedPdfFile = "JVBERi0xLjQKJeLjz9MKNCAwIG9i...";
    const pdfFileName = "Fabrikam_Report_202509";

    // Decrypted properties of a cloud attachment.
    const cloudFilePath = "https://contosostorage.com/reports/weekly_forecast.xlsx";
    const cloudFileName = "weekly_forecast.xlsx";

    // Decrypted content and properties of an inline image.
    const decryptedImageFile = "iVBORw0KGgoAAAANSUhEUgAA...";
    const imageFileName = "banner.png";
    const imageContentId = "image001.png@01DC1DD9.1A4AA300";

    const decryptedAttachments = [
        {
            attachmentType: Office.MailboxEnums.AttachmentType.File,
            content: decryptedPdfFile,
            isInline: false,
            name: pdfFileName
        },
        {
            attachmentType: Office.MailboxEnums.AttachmentType.Cloud,
            isInline: false,
            name: cloudFileName,
            path: cloudFilePath
        },
        {
            attachmentType: Office.MailboxEnums.AttachmentType.File,
            content: decryptedImageFile,
            contentId: imageContentId,
            isInline: true,
            name: imageFileName
        }
    ];

    event.completed(
        {
            allowEvent: true,
            emailBody: decryptedBody,
            attachments: decryptedAttachments,
            contextData: { messageType: "ReplyFromDecryptedMessage" }
        }
    );
}

Eigenschaften

coercionType

Gibt das Format des Nachrichtentexts an. Der Text einer Nachricht kann als Office.CoercionType.Html oder Office.CoercionType.Textformatiert werden.

content

Gibt den Inhalt an, der im Textkörper der Nachricht angezeigt wird.

Details zur Eigenschaft

coercionType

Gibt das Format des Nachrichtentexts an. Der Text einer Nachricht kann als Office.CoercionType.Html oder Office.CoercionType.Textformatiert werden.

coercionType: Office.CoercionType;

Eigenschaftswert

Hinweise

API-Satz: Postfach 1.16

Minimale Berechtigungsstufe: Element lesen/schreiben

Anwendbarer Outlook-Modus: Lesen von Nachrichten

content

Gibt den Inhalt an, der im Textkörper der Nachricht angezeigt wird.

content: string;

Eigenschaftswert

string

Hinweise

API-Satz: Postfach 1.16

Minimale Berechtigungsstufe: Element lesen/schreiben

Anwendbarer Outlook-Modus: Lesen von Nachrichten