TransferEncoding 열거형

정의

이메일 메시지 첨부 파일의 Content-Transfer-Encoding 헤더 정보를 지정합니다.

public enum class TransferEncoding
public enum TransferEncoding
type TransferEncoding = 
Public Enum TransferEncoding
상속
TransferEncoding

필드

Base64 1

스트림 기반 데이터를 인코딩합니다. 자세한 내용은 RFC 2406 6.8절을 참조하십시오.

EightBit 3

이 데이터는 총 1000자 이하의 줄 길이를 사용하는 국가별 문자를 나타내는 8비트 문자입니다. 이 8비트 MIME 전송 확장에 대한 자세한 내용은 IETF RFC 6152를 참조하십시오.

QuotedPrintable 0

US-ASCII 문자 집합의 인쇄 가능한 문자로 구성된 데이터를 인코딩합니다. RFC 2406 6.7절을 참조하세요.

SevenBit 2

인코딩되지 않은 데이터에 사용됩니다. 이 데이터는 총 1000자 이하의 줄 길이를 사용하는 7비트 US-ASCII 문자입니다. 자세한 내용은 RFC2406 2.7절을 참조하십시오.

Unknown -1

전송 인코딩을 알 수 없음을 나타냅니다.

예제

다음은 첨부 파일에서 TransferEncoding 사용하는 코드 예제입니다.

static void DisplayStreamAttachment( Attachment^ a )
{
   Stream^ s = a->ContentStream;
   StreamReader^ reader = gcnew StreamReader( s );
   Console::WriteLine( L"Content: {0}", reader->ReadToEnd() );
   Console::WriteLine( L"Content Type {0}", a->ContentType );
   Console::WriteLine( L"Transfer Encoding {0}", a->TransferEncoding );
   
   // Note that you cannot close the reader before the email is sent. 
   // Closing the reader before sending the email will close the 
   // ContentStream and cause an SmtpException.
   reader = nullptr;
}
public static void DisplayStreamAttachment(Attachment a)
{
    Stream s = a.ContentStream;
    StreamReader reader = new StreamReader(s);
    Console.WriteLine("Content: {0}", reader.ReadToEnd());
    Console.WriteLine("Content Type {0}", a.ContentType.ToString());
    Console.WriteLine("Transfer Encoding {0}", a.TransferEncoding);
    // Note that you cannot close the reader before the email is sent.
    // Closing the reader before sending the email will close the
    // ContentStream and cause an SmtpException.
    reader = null;
}

설명

열거형의 TransferEncoding 값은 속성과 함께 AttachmentBase.TransferEncoding 사용됩니다.

Content-Transfer-Encoding 헤더는 SMTP 요구 사항을 충족할 수 있도록 연결된 메시지 본문의 인코딩을 지정합니다. SMTP를 사용하려면 전송에 대한 데이터가 1000자 이하의 줄이 있는 7비트 US-ASCII 문자여야 합니다.

Content-Transfer-Encoding 값은 RFC 2045 섹션 6에 자세히 설명되어 있습니다 https://www.ietf.org.

적용 대상