Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


AlternateView.CreateAlternateViewFromString Method

Definition

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

Overloads

CreateAlternateViewFromString(String)

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

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)

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)

Source:
AlternateView.cs
Source:
AlternateView.cs
Source:
AlternateView.cs

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

public static System.Net.Mail.AlternateView CreateAlternateViewFromString (string content);

Parameters

content
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

content is null.

Remarks

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

Applies to

.NET 9 és más verziók
Termék Verziók
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

CreateAlternateViewFromString(String, ContentType)

Source:
AlternateView.cs
Source:
AlternateView.cs
Source:
AlternateView.cs

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 (string content, System.Net.Mime.ContentType? contentType);
public static System.Net.Mail.AlternateView CreateAlternateViewFromString (string content, System.Net.Mime.ContentType contentType);

Parameters

content
String

A String that contains the content for this attachment.

contentType
ContentType

A ContentType that describes the data in content.

Returns

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

Exceptions

content is null.

Applies to

.NET 9 és más verziók
Termék Verziók
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

CreateAlternateViewFromString(String, Encoding, String)

Source:
AlternateView.cs
Source:
AlternateView.cs
Source:
AlternateView.cs

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 (string content, System.Text.Encoding? contentEncoding, string? mediaType);
public static System.Net.Mail.AlternateView CreateAlternateViewFromString (string content, System.Text.Encoding contentEncoding, string mediaType);

Parameters

content
String

A String that contains the content for this attachment.

contentEncoding
Encoding

An Encoding. This value can be null.

mediaType
String

The MIME media type of the content.

Returns

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

Exceptions

content is null.

Applies to

.NET 9 és más verziók
Termék Verziók
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1