SmtpMail.SmtpServer 속성

정의

이메일 메시지를 보내는 데 사용하는 SMTP 릴레이 메일 서버 이름을 가져오거나 설정합니다. 권장되는 대체 항목: System.Net.Mail.

public:
 static property System::String ^ SmtpServer { System::String ^ get(); void set(System::String ^ value); };
public static string SmtpServer { get; set; }
member this.SmtpServer : string with get, set
Public Shared Property SmtpServer As String

속성 값

String

전자 메일 릴레이 서버의 이름입니다.

예제

//This example assigns the name of the mail relay server on the 
//local network to the SmtpServer property.
SmtpMail.SmtpServer = "RelayServer.Contoso.com";
' This example assigns the name of the mail relay server on the 
' local network to the SmtpServer property.
SmtpMail.SmtpServer = "RelayServer.Contoso.com"

설명

T에 SMTP 메시지를 릴레이에 허용 되는 네트워크에서 사용 가능한 스마트 호스트 있는지 확인 해야 합니다 (포트 25)를 통해 직접 SMTP 트래픽을 차단 하는 방화벽 뒤 로컬 SMTP 서버 (Windows 2000 및 Windows Server 2003 포함) 인 경우 또한 인터넷입니다.

스마트 호스트는 내부 SMTP 서버에서 인터넷에 직접 보내는 전자 메일 메시지를 릴레이 하는 권한 사용 하 여 SMTP 서버. 스마트 호스트에 동시에 연결할 내부 네트워크와 인터넷 메일 게이트웨이로 작동 하려면 수 있어야 합니다.

적용 대상