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
                    を検索
                - MailMessage.Bodyのページへのリンク