SmtpMail.SmtpServer 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定 SMTP 中繼郵件伺服器的名稱,用於發送電子郵件。 建議的替代方式:System.Net.Mail。
public:
static property System::String ^ SmtpServer { System::String ^ get(); void set(System::String ^ value); };
public static string SmtpServer { get; set; }
static member SmtpServer : string with get, set
Public Shared Property SmtpServer As String
屬性值
電子郵件中繼伺服器的名稱。
備註
如果你的本地 SMTP 伺服器被防火牆阻擋任何直接 SMTP 流量(透過埠 25),你需要查明網路上是否有智慧主機允許將 SMTP 訊息中繼到網際網路。
智慧主機是一種擁有直接從內部 SMTP 伺服器轉發電子郵件到網際網路的 SMTP 伺服器的 SMTP 伺服器。 智慧主機應能同時連接內部網路與網際網路,作為電子郵件閘道器運作。