MailMessageLoadBodyTextAsync Method (String, MessageBodyType, Encoding, ImportBodyOptions) |
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public Task<bool> LoadBodyTextAsync(
string path,
MessageBodyType bodyType,
Encoding sourceEncoding,
ImportBodyOptions options
)
Public Function LoadBodyTextAsync (
path As String,
bodyType As MessageBodyType,
sourceEncoding As Encoding,
options As ImportBodyOptions
) As Task(Of Boolean)
Parameters
- path
- 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. - bodyType
- Type: MailBee.MimeMessageBodyType
Denotes whether to load the data into HTML body or into plain-text body. - sourceEncoding
- 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). - options
- 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:
TaskBooleanA task that represents the asynchronous operation.
The value of
TResult parameter is
true if succeeded; otherwise,
false.
Exceptions See Also