MailMessageLoadBodyTextAsync Method (String, MessageBodyType, Encoding, ImportBodyOptions)

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
public Task<bool> LoadBodyTextAsync(
	string path,
	MessageBodyType bodyType,
	Encoding sourceEncoding,
	ImportBodyOptions options


Type: SystemString
The path to the file containing the text to be loaded into the message body. This path can be an URI (such as web page URL or file path specified as file:///) if options value includes PathIsUri flag.
Type: MailBee.MimeMessageBodyType
Denotes whether to load the data into HTML body or into plain-text body.
Type: System.TextEncoding
The charset of the data in the file being loaded. If a null reference (Nothing in Visual Basic), DefaultEncoding will be assumed (unless the charset information is available in META tag of the HTML data being loaded).
Type: MailBee.MimeImportBodyOptions
A set of flags which affect how the data is loaded from the file into the message body and whether (and how) the related objects should be attached.

Return Value

Type: TaskBoolean
A task that represents the asynchronous operation. The value of TResult parameter is true if succeeded; otherwise, false.
MailBeeInvalidArgumentExceptionpath is a null reference (Nothing in Visual Basic) or an empty string.
MailBeeWebExceptionA downloading error occurred and ThrowExceptions is true.
MailBeeIOExceptionAn I/O error occurred and ThrowExceptions is true.
See Also