MailMessage.Body プロパティ
アセンブリ: System (system.dll 内)

本文テキストを格納している String 値。

Body の内容の ContentType は "text/plain" です。BodyEncoding プロパティを使用して、本文に使用されるエンコーディングを指定します。
受信者がより高度な形式で表示できる別形式の本文のコンテンツがある場合は、AlternateViews プロパティを使用して本文のコンテンツにその表示内容を指定できます。たとえば、アプリケーションで、プレーン テキストの本文と HTML 版のメッセージ本文の両方を送信する場合があります。HTML を表示できる電子メール プログラムでは受信者に HTML 版の本文を表示できますが、HTML を表示できない電子メール プログラムでは代わりにプレーン テキスト版のメッセージを表示します。

public static void CreateTestMessage2(string server) { string to = "jane@contoso.com"; string from = "ben@contoso.com"; MailMessage message = new MailMessage(from, to); message.Subject = "Using the new SMTP client."; message.Body = @"Using this new feature, you can send an e-mail message from an application very easily."; SmtpClient client = new SmtpClient(server); // Credentials are necessary if the server requires the client // to authenticate before it will send e-mail on the client's behalf. client.UseDefaultCredentials = true; client.Send(message); }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


MailMessage.Body プロパティ
アセンブリ: System.Web (system.web.dll 内)

電子メールの本文。

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


Weblioに収録されているすべての辞書からMailMessage.Bodyを検索する場合は、下記のリンクをクリックしてください。

- MailMessage.Bodyのページへのリンク