SmtpMail.SmtpServer プロパティ
アセンブリ: System.Web (system.web.dll 内)
構文
Public Shared Property SmtpServer As String
/** @property */ public static String get_SmtpServer () /** @property */ public static void set_SmtpServer (String value)
public static function get SmtpServer () : String public static function set SmtpServer (value : String)
電子メール リレー サーバーの名前。SmtpServer が設定されていない場合は、ローカル SMTP サーバーの名前が使用されます。
ローカルの SMTP サーバー (Windows 2000 Server および Windows Server 2003 に含まれる) がファイアウォールの後ろに配置されており、ポート 25 からのダイレクトな SMTP トラフィックがブロックされている場合、SMTP メッセージのインターネットへのリレーを許可するスマート ホストがネットワーク内にあるかどうかを調べる必要があります。
スマート ホストとは、内部の SMTP サーバーからインターネットに送信メッセージを直接リレーする許可を持つ SMTP サーバーです。スマート ホストは、電子メールのゲートウェイとして機能できるためには、内部ネットワークとインターネットの両方に同時に接続できる必要があります。
' This example assigns the name of the mail relay server on the ' local network to the SmtpServer property. SmtpMail.SmtpServer = "RelayServer.Contoso.com"
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- SmtpMail.SmtpServer プロパティのページへのリンク