AlternateView.CreateAlternateViewFromString AlternateView.CreateAlternateViewFromString AlternateView.CreateAlternateViewFromString AlternateView.CreateAlternateViewFromString Method

Definition

Creates an AlternateView of an email message using the content specified in a String.

Overloads

CreateAlternateViewFromString(String) CreateAlternateViewFromString(String) CreateAlternateViewFromString(String) CreateAlternateViewFromString(String)

Creates a AlternateView of an email message using the content specified in a String.

CreateAlternateViewFromString(String, ContentType) CreateAlternateViewFromString(String, ContentType) CreateAlternateViewFromString(String, ContentType)

Creates an AlternateView of an email message using the content specified in a String and the specified MIME media type of the content.

CreateAlternateViewFromString(String, Encoding, String) CreateAlternateViewFromString(String, Encoding, String) CreateAlternateViewFromString(String, Encoding, String) CreateAlternateViewFromString(String, Encoding, String)

Creates an AlternateView of an email message using the content specified in a String, the specified text encoding, and MIME media type of the content.

CreateAlternateViewFromString(String) CreateAlternateViewFromString(String) CreateAlternateViewFromString(String) CreateAlternateViewFromString(String)

Creates a AlternateView of an email message using the content specified in a String.

public:
 static System::Net::Mail::AlternateView ^ CreateAlternateViewFromString(System::String ^ content);
public static System.Net.Mail.AlternateView CreateAlternateViewFromString (string content);
static member CreateAlternateViewFromString : string -> System.Net.Mail.AlternateView
Public Shared Function CreateAlternateViewFromString (content As String) As AlternateView
Parameters
content
String String String String

The String that contains the content of the email message.

Returns

An AlternateView object that represents an alternate view of an email message.

Exceptions

Remarks

The default media type is plain text and the default encoding is ASCII.

CreateAlternateViewFromString(String, ContentType) CreateAlternateViewFromString(String, ContentType) CreateAlternateViewFromString(String, ContentType)

Creates an AlternateView of an email message using the content specified in a String and the specified MIME media type of the content.

public:
 static System::Net::Mail::AlternateView ^ CreateAlternateViewFromString(System::String ^ content, System::Net::Mime::ContentType ^ contentType);
public static System.Net.Mail.AlternateView CreateAlternateViewFromString (string content, System.Net.Mime.ContentType contentType);
static member CreateAlternateViewFromString : string * System.Net.Mime.ContentType -> System.Net.Mail.AlternateView
Parameters
content
String String String String

A String that contains the content for this attachment.

contentType
ContentType ContentType ContentType ContentType

A ContentType that describes the data in string.

Returns

An AlternateView object that represents an alternate view of an email message.

Exceptions

CreateAlternateViewFromString(String, Encoding, String) CreateAlternateViewFromString(String, Encoding, String) CreateAlternateViewFromString(String, Encoding, String) CreateAlternateViewFromString(String, Encoding, String)

Creates an AlternateView of an email message using the content specified in a String, the specified text encoding, and MIME media type of the content.

public:
 static System::Net::Mail::AlternateView ^ CreateAlternateViewFromString(System::String ^ content, System::Text::Encoding ^ encoding, System::String ^ mediaType);
public static System.Net.Mail.AlternateView CreateAlternateViewFromString (string content, System.Text.Encoding encoding, string mediaType);
static member CreateAlternateViewFromString : string * System.Text.Encoding * string -> System.Net.Mail.AlternateView
Public Shared Function CreateAlternateViewFromString (content As String, contentEncoding As Encoding, mediaType As String) As AlternateView
Parameters
content
String String String String

A String that contains the content for this attachment.

contentEncoding
Encoding Encoding Encoding Encoding

An Encoding. This value can be null.

mediaType
String String String String

The MIME media type of the content.

Returns

An AlternateView object that represents an alternate view of an email message.

Exceptions

Applies to