TransferEncoding 列挙体
アセンブリ: System (system.dll 内)

Public Enumeration TransferEncoding

メンバ名 | 説明 | |
---|---|---|
Base64 | ストリーム ベースのデータをエンコードします。RFC 2406 セクション 6.8 を参照してください。 | |
QuotedPrintable | US-ASCII 文字セットの印刷可能な文字で構成されるデータをエンコードします。RFC 2406 セクション 6.7 を参照してください。 | |
SevenBit | エンコードされないデータに使用されます。このデータは、行の全長が 1000 文字以内の 7 ビット US-ASCII 文字です。RFC 2406 セクション 2.7 を参照してください。 | |
Unknown | 転送エンコーディングが不明であることを示します。 |

TransferEncoding 列挙体の値は、AttachmentBase.TransferEncoding プロパティで使用されます。
Content-Transfer-Encoding ヘッダーは、SMTP の要件が満たされるように、関連付けられたメッセージ本文のエンコーディングを指定します。SMTP では、伝送データは 1000 文字以内の 7 ビット US-ASCII 文字のテキスト行である必要があります。
Content-Transfer-Encoding の値の詳細については、RFC 2045 セクション 6 (http://www.ietf.org) を参照してください。

添付データで使用される TransferEncoding を表示するコード例を次に示します。
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 e-mail is sent. // Closing the reader before sending the e-mail will close the // ContentStream and cause an SmtpException. reader = null; }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- TransferEncoding 列挙体のページへのリンク