CodeGo.net> C#-MailMessage的问题/混乱

使用这个:

MailMessage mm = new MailMessage();

之间有什么区别?

mm.Sender =发送者;和mm.From = from; ?

谢谢

解决方法:

Sender属性设置Sender标头.它上只能有一个电子邮件地址,并且如果“发件人”地址有多个电子邮件地址,则此标头必须存在.

From属性设置From标头.它可以有多个电子邮件地址.

参见RFC 5322(第3.6.2节):

The originator fields of a message consist of the from field, the
sender field (when applicable), and optionally the reply-to field.
The from field consists of the field name “From” and a comma-
separated list of one or more mailbox specifications. If the from
field contains more than one mailbox specification in the mailbox-
list, then the sender field, containing the field name “Sender” and a
single mailbox specification, MUST appear in the message.

上一篇:c#-MVP被动视图-将视图数据和模型数据分开


下一篇:C#如何根据一个属性网格中另一个属性的值公开一个属性?