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

属性值

发件人的电子邮件地址。

示例

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

适用于