編輯

共用方式為


MailMessage.From Property

Definition

Gets or sets the email address of the sender. Recommended alternative: 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

Property Value

The sender's email address.

Examples

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

Applies to