通过 SMTPClient 发送电子邮件时需要更改 FromEmail 字符串
我的电子邮件发送代码
MailMessage msg = new MailMessage("[email protected]", "[email protected]", "testing email", "to check from email label text");
SmtpClient smpt = new SmtpClient();
smpt.Send(msg);
当 [email protected] 用户打开电子邮件时,在从电子邮件中,提到了[email protected],我需要在其中显示类似Abc Corporation [[电子邮件受保护]]
如何我可以更改电子邮件地址标签吗
谢谢
My Email Sending Code
MailMessage msg = new MailMessage("[email protected]", "[email protected]", "testing email", "to check from email label text");
SmtpClient smpt = new SmtpClient();
smpt.Send(msg);
When email open by [email protected] user, In the from email, its mentioned [email protected] where as I need to show like Abc Corporation [[email protected]]
How can I change from Email address label
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用真实姓名和电子邮件地址创建 MailAddress,然后将其提供给 MailMessage。
来自 MSDN(来自属性邮件留言)。
Create a MailAddress with the real name and email address, then supply that to the MailMessage.
From MSDN (From property for MailMessage).
使用显示名称
Use the DisplayName