Office.DecryptedMessageBody interface
Hinweis
Diese API wird als Vorschau für Entwickler bereitgestellt. Je nachdem, welches Feedback wir dazu erhalten, werden möglicherweise Änderungen vorgenommen. Verwenden Sie diese API nicht in einer Produktionsumgebung.
Stellt den Text einer entschlüsselten Nachricht dar.
Hinweise
[ API-Satz: Postfachvorschau ]
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.
Beispiele
// This sample handles the OnMessageRead event to decrypt the body and attachments of a message.
function onMessageReadHandler(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 content and properties of a mail item.
const decryptedEmailFile = "VGhpcyBpcyBhIHRleHQgZmlsZS4=...";
const emailFileName = "Fabrikam_Report_202508.eml";
// 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.Item,
content: decryptedEmailFile,
isInline: false,
name: emailFileName
},
{
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
| coercion |
Gibt das Format des Nachrichtentexts an. Der Text einer Nachricht kann als |
| content | Gibt den Inhalt an, der im Textkörper der Nachricht angezeigt wird. |
Details zur Eigenschaft
coercionType
Hinweis
Diese API wird als Vorschau für Entwickler bereitgestellt. Je nachdem, welches Feedback wir dazu erhalten, werden möglicherweise Änderungen vorgenommen. Verwenden Sie diese API nicht in einer Produktionsumgebung.
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: Postfachvorschau ]
Minimale Berechtigungsstufe: Element lesen/schreiben
Anwendbarer Outlook-Modus: Lesen von Nachrichten
content
Hinweis
Diese API wird als Vorschau für Entwickler bereitgestellt. Je nachdem, welches Feedback wir dazu erhalten, werden möglicherweise Änderungen vorgenommen. Verwenden Sie diese API nicht in einer Produktionsumgebung.
Gibt den Inhalt an, der im Textkörper der Nachricht angezeigt wird.
content: string;
Eigenschaftswert
string
Hinweise
[ API-Satz: Postfachvorschau ]
Minimale Berechtigungsstufe: Element lesen/schreiben
Anwendbarer Outlook-Modus: Lesen von Nachrichten