共用方式為


MailMessage.From 屬性

定義

取得或設定寄件者的電子郵件地址。 建議的替代做法: System.Net.Mail

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

屬性值

String

寄件者的電子郵件地址。

範例

MailMessage MyMessage = new MailMessage();
MyMessage.From = "john@contoso.com";
Dim  MyMessage As MailMessage = New MailMessage()
MyMessage.From = "john@contoso.com"

適用於