TnefParserGetAttachments Method (String, TnefExtractionOptions)
Extracts attachments and, optionally, rich-text body from a winmail.dat file.

Namespace: MailBee.Tnef
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public static AttachmentCollection GetAttachments(
	string filename,
	TnefExtractionOptions options
)

Parameters

filename
Type: SystemString
The path to the file containing TNEF data.
options
Type: MailBee.MimeTnefExtractionOptions
Specifies which kinds of items (attachments and/or RTF message body) to extract from TNEF.

Return Value

Type: AttachmentCollection
An AttachmentCollection object representing the collection of the requested items extracted from TNEF.
Exceptions
ExceptionCondition
MailBeeInvalidArgumentExceptionfilename is a null reference (Nothing in Visual Basic) or an empty string.
MailBeeIOExceptionA file reading error occurred.
MailBeeTnefExceptionA TNEF parsing error occurred.
Remarks

In case if you got an e-mail with a TNEF attachment, it's easier to use GetAttachmentsFromTnef method to extract data from it.

This overload internally handles the situation when the source file contents ends with excessive CRLF at the end. You don't need to do anything to handle this situation.

See Also