Share via


EmailMessage.Create method (BodyFormat, Boolean, String)

The Create method creates a new instance of the EmailMessage class by using the specified BodyFormat, createAlternative parameter value, and charsetName parameter value.

Namespace:  Microsoft.Exchange.Data.Transport.Email
Assembly:  Microsoft.Exchange.Data.Transport (in Microsoft.Exchange.Data.Transport.dll)

Syntax

'Declaration
Public Shared Function Create ( _
    bodyFormat As BodyFormat, _
    createAlternative As Boolean, _
    charsetName As String _
) As EmailMessage
'Usage
Dim bodyFormat As BodyFormat
Dim createAlternative As Boolean
Dim charsetName As String
Dim returnValue As EmailMessage

returnValue = EmailMessage.Create(bodyFormat, _
    createAlternative, charsetName)
public static EmailMessage Create(
    BodyFormat bodyFormat,
    bool createAlternative,
    string charsetName
)

Parameters

  • createAlternative
    Type: System.Boolean

    A Boolean value that indicates whether alternative body text should be created when the bodyFormat parameter value is set to Html.

  • charsetName
    Type: System.String

    A string value that indicates the character set to use for the body of the message.

Return value

Type: Microsoft.Exchange.Data.Transport.Email.EmailMessage

See also

Reference

EmailMessage class

EmailMessage members

Create overload

Microsoft.Exchange.Data.Transport.Email namespace