MapiAttachment

MapiAttachment

Vue de l’ensemble

‘MapiAttachment’ représente un fichier ou une annexe de message intégré dans un email MAPI .msg. Créez des annexes en utilisant les méthodes d’usine statiques FromBytes ou Straam, puis ajoutez-les à un Mapimessage via AddAttack . Lire le contenu de l’annexe via ‘LoadDataetOpenRead`.. La collection ‘Properties’ expose des flux propriétaires MAPI de faible niveau pour le stockage de la annexion.

méthodes

SignatureDescription
FromBytes(filename: string, data: byte[], mimeType: string?, contentId: string?)Creates a MapiAttachment from a byte array with optional MIME type and Content-ID.
FromStream(filename: string, stream: Stream, mimeType: string?, contentId: string?)Creates a MapiAttachment by reading all bytes from stream.
LoadData(stream: Stream)Loads attachment binary data from stream into Data.
OpenRead()Returns a Stream positioned at the start of the attachment data for sequential reading.

Propriétés

NameTypeAccessDescription
Filenamestring?ReadOriginal filename of the attached file, or null if not set.
Databyte[]ReadRaw binary content of the attachment.
MimeTypestring?ReadMIME content-type string (e.g. application/pdf), or null if not specified.
ContentIdstring?ReadContent-ID header value for inline MIME attachments, or null if not set.
EmbeddedMessageMapiMessage?ReadThe embedded MapiMessage when IsEmbeddedMessage is true; otherwise null.
PropertiesMapiPropertyCollectionReadLow-level MAPI property collection for this attachment’s storage.
IsEmbeddedMessageboolReadThe embedded MapiMessage when IsEmbeddedMessage is true; otherwise null.
IsStorageAttachmentboolReadTrue if the attachment is stored as a sub-storage in the CFB document rather than a stream.

Voir aussi

 Français