MailMessageLoadBodyTextAsync Method (String, MessageBodyType)
async/await version of LoadBodyText(String, MessageBodyType).

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public Task<bool> LoadBodyTextAsync(
	string filename,
	MessageBodyType bodyType
)

Parameters

filename
Type: SystemString
The absolute or relative path to the file containing the text to be imported.
bodyType
Type: MailBee.MimeMessageBodyType
Denotes whether to load the data into HTML body or into plain-text body.

Return Value

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