Question / Confusion MailMessage

Using this:

MailMessage mm = new MailMessage();

What's the difference between:

mm.Sender = sender;and mm.From = from;?

thank

+3
source share
2 answers

The property Sendersets the title Sender. It can only have one email address, and if the address Fromhas more than one email address, this header must exist.

The property Fromsets the title From. It can have multiple email addresses.

See RFC 5322 (section 3.6.2):

from,     ( ) .     from "From"     .     -    , , ""     , .

+1

Sender "", From "".

"" . - . , "". Sender .

, "Reply-To", , . From Sender .

+2

Source: https://habr.com/ru/post/1744665/


All Articles