System.Net.Mail.MailMessage.Sender vs System.Net.Mail.MailMessage.From

cjard

Well-known member
Joined
Apr 25, 2006
Messages
7,081
Programming Experience
10+
System.Net.Mail.MailMessage has the following 2 properties:

Sender
Gets or sets the sender's address for this e-mail message

From
Gets or sets the from address for this e-mail message


Maybe I missed something, but what's the difference? It's not for Reply-To purposes because there is a property for that... These properties are of type MailAddress, which contains an address and a displayname.
 
I send something on behalf of my boss.
I am the sender.
My Boss is who the email is from.
Reply back to the secratary.

-tg
 
indeed you are correct. I investigated a little myself and found after setting the properties up like what seemed sensible, that the message source is:


from: "The Boss (auto generated by software)" <the_boss@co.com>
sender: "The Problem Reporting Software" <prob_reporter@co.com>
to: <the_recipient@co.com>

So, i would say youre correct there, my man.. Is it just me (and the one other guy i found via google) that think this distinction isnt that clear? maybe i'm just too literal sometimes!
 
Actualy, if I remember right, that's something that is spelled out in the SMTP specifications, which is where I think I picked that piece of info from. Mahybe it's because I've dealt with this type of delegation (which is when something is sent by someone on behalf of someone else) that I clearly see the difference between the Sender and From.... but it is also how spammers work to make it look like it came from one person, when it came from someone else. Ahh... ya gotta love technology.

-tg
 
Back
Top