Share via


Attachment.CreateAttachmentFromString 메서드

정의

문자열에서 첨부 파일을 만듭니다.

오버로드

CreateAttachmentFromString(String, ContentType)

지정된 문자열의 내용 및 지정된 ContentType을 사용하여 전자 메일 첨부 파일을 만듭니다.

CreateAttachmentFromString(String, String)

지정된 문자열의 내용 및 지정된 MIME 콘텐츠 형식 이름을 사용하여 전자 메일 첨부 파일을 만듭니다.

CreateAttachmentFromString(String, String, Encoding, String)

지정된 문자열의 내용과 첨부 파일에 대해 지정된 MIME 콘텐츠 형식 이름, 문자 인코딩 및 MIME 헤더 정보를 사용하여 전자 메일 첨부 파일을 만듭니다.

CreateAttachmentFromString(String, ContentType)

Source:
Attachment.cs
Source:
Attachment.cs
Source:
Attachment.cs

지정된 문자열의 내용 및 지정된 ContentType을 사용하여 전자 메일 첨부 파일을 만듭니다.

public:
 static System::Net::Mail::Attachment ^ CreateAttachmentFromString(System::String ^ content, System::Net::Mime::ContentType ^ contentType);
public static System.Net.Mail.Attachment CreateAttachmentFromString (string content, System.Net.Mime.ContentType contentType);
static member CreateAttachmentFromString : string * System.Net.Mime.ContentType -> System.Net.Mail.Attachment
Public Shared Function CreateAttachmentFromString (content As String, contentType As ContentType) As Attachment

매개 변수

content
String

이 첨부 파일의 내용이 들어 있는 String입니다.

contentType
ContentType

사용할 MIME(Multipurpose Internet Mail Exchange) 프로토콜 Content-Type 헤더를 나타내는 ContentType 개체입니다.

반환

Attachment 형식의 개체입니다.

적용 대상

CreateAttachmentFromString(String, String)

Source:
Attachment.cs
Source:
Attachment.cs
Source:
Attachment.cs

지정된 문자열의 내용 및 지정된 MIME 콘텐츠 형식 이름을 사용하여 전자 메일 첨부 파일을 만듭니다.

public:
 static System::Net::Mail::Attachment ^ CreateAttachmentFromString(System::String ^ content, System::String ^ name);
public static System.Net.Mail.Attachment CreateAttachmentFromString (string content, string? name);
public static System.Net.Mail.Attachment CreateAttachmentFromString (string content, string name);
static member CreateAttachmentFromString : string * string -> System.Net.Mail.Attachment
Public Shared Function CreateAttachmentFromString (content As String, name As String) As Attachment

매개 변수

content
String

이 첨부 파일의 내용이 들어 있는 String입니다.

name
String

이 첨부 파일과 연결된 콘텐츠 형식의 MIME 콘텐츠 형식 이름 값입니다.

반환

Attachment 형식의 개체입니다.

설명

콘텐츠가 ASCII 형식이면 문자 인코딩이 ASCII로 설정됩니다. 다른 모든 형식의 경우 문자 인코딩이 utf-8로 설정됩니다. 기본 미디어 형식은 일반 텍스트입니다.

콘텐츠가 ASCII 형식이 아니고 인코딩이 null이면 utf-8 인코딩이 사용됩니다.

적용 대상

CreateAttachmentFromString(String, String, Encoding, String)

Source:
Attachment.cs
Source:
Attachment.cs
Source:
Attachment.cs

지정된 문자열의 내용과 첨부 파일에 대해 지정된 MIME 콘텐츠 형식 이름, 문자 인코딩 및 MIME 헤더 정보를 사용하여 전자 메일 첨부 파일을 만듭니다.

public:
 static System::Net::Mail::Attachment ^ CreateAttachmentFromString(System::String ^ content, System::String ^ name, System::Text::Encoding ^ contentEncoding, System::String ^ mediaType);
public static System.Net.Mail.Attachment CreateAttachmentFromString (string content, string? name, System.Text.Encoding? contentEncoding, string? mediaType);
public static System.Net.Mail.Attachment CreateAttachmentFromString (string content, string name, System.Text.Encoding contentEncoding, string mediaType);
static member CreateAttachmentFromString : string * string * System.Text.Encoding * string -> System.Net.Mail.Attachment
Public Shared Function CreateAttachmentFromString (content As String, name As String, contentEncoding As Encoding, mediaType As String) As Attachment

매개 변수

content
String

이 첨부 파일의 내용이 들어 있는 String입니다.

name
String

이 첨부 파일과 연결된 콘텐츠 형식의 MIME 콘텐츠 형식 이름 값입니다.

contentEncoding
Encoding

Encoding입니다. 이 값은 null일 수 있습니다.

mediaType
String

이 첨부 파일의 MIME Content-Header 정보가 들어 있는 String입니다. 이 값은 null일 수 있습니다.

반환

Attachment 형식의 개체입니다.

적용 대상