Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将 mailmessage.from 属性设置为简单的文本而不是电子邮件地址。这是怎么做到的?
MailAddress from = new MailAddress("ben@contoso.com", "Ben Miller");
假设您希望 From显示“Ben Miller”。
在幕后,“ben@contoso.com”仍将存在于“发件人”中。一个有效的电子邮件地址是必需的,你不能做任何事情来改变它。