Click here to Skip to main content
15,891,513 members
Home / Discussions / C#
   

C#

 
GeneralRe: The "using" directives at the top of a .cs Pin
Vodstok28-Aug-07 9:01
Vodstok28-Aug-07 9:01 
AnswerRe: The "using" directives at the top of a .cs Pin
PIEBALDconsult28-Aug-07 8:55
mvePIEBALDconsult28-Aug-07 8:55 
QuestionSaving User Settings to a different file Pin
baelzaden28-Aug-07 1:58
baelzaden28-Aug-07 1:58 
AnswerRe: Saving User Settings to a different file Pin
Spacix One28-Aug-07 2:51
Spacix One28-Aug-07 2:51 
AnswerRe: Saving User Settings to a different file Pin
Scott Dorman28-Aug-07 4:22
professionalScott Dorman28-Aug-07 4:22 
QuestionCalling client side control through httpwebrequest Pin
Dipti D Jadhav28-Aug-07 1:47
Dipti D Jadhav28-Aug-07 1:47 
QuestionSender vs From Pin
logicaldna28-Aug-07 1:33
logicaldna28-Aug-07 1:33 
AnswerRe: Sender vs From Pin
Scott Dorman28-Aug-07 4:38
professionalScott Dorman28-Aug-07 4:38 
Have you looked at the RFC 2822[^] for email messages?

From §3.6.2 Originator fields
The "From:" field specifies the author(s) of the message,
that is, the mailbox(es) of the person(s) or system(s) responsible
for the writing of the message. The "Sender:" field specifies the
mailbox of the agent responsible for the actual transmission of the
message. For example, if a secretary were to send a message for
another person, the mailbox of the secretary would appear in the
"Sender:" field and the mailbox of the actual author would appear in
the "From:" field. If the originator of the message can be indicated
by a single mailbox and the author and transmitter are identical, the
"Sender:" field SHOULD NOT be used. Otherwise, both fields SHOULD
appear.

The originator fields also provide the information required when
replying to a message. When the "Reply-To:" field is present, it
indicates the mailbox(es) to which the author of the message suggests
that replies be sent. In the absence of the "Reply-To:" field,
replies SHOULD by default be sent to the mailbox(es) specified in the
"From:" field unless otherwise specified by the person composing the
reply.

In all cases, the "From:" field SHOULD NOT contain any mailbox that
does not belong to the author(s) of the message.


From RFC 2821[^], §6.1
If there is a delivery failure after acceptance of a message, the
receiver-SMTP MUST formulate and mail a notification message. This
notification MUST be sent using a null ("<>") reverse path in the
envelope. The recipient of this notification MUST be the address
from the envelope return path (or the Return-Path: line).


So...to directly your questions:
logicaldna wrote:
What is the diff between Sender property of MailMessage and From property of MailMessage.
What is the difference between ReplyTO and ReturnPath
they have same meaning in usage. dont they ?
Now my client wants to use these things with unique cases


The "From:" field specifies the author(s) of the message. The "Sender:" field specifies the mailbox of the agent responsible for the actual transmission of the message.

The "Reply-To:" field (if it is present), indicates the mailbox(es) to which the author of the message suggests that replies be sent.

The "Return-Path" field indicates the mailbox that a delivery failure notification should be sent to.

You need to get specific cases, including all of the edge cases clearly documented from your client.

It sounds like you are trying to write an SMTP compliant email system. I'd recommend using one of the commercially available versions instead of trying to do it yourself as there are a ton of rules that need to be followed and some of them are fairly non-trivial.


Scott.

—In just two days, tomorrow will be yesterday.

[Forum Guidelines] [Articles] [Blog]

GeneralRe: Sender vs From Pin
logicaldna28-Aug-07 4:46
logicaldna28-Aug-07 4:46 
GeneralRe: Sender vs From Pin
Scott Dorman28-Aug-07 5:15
professionalScott Dorman28-Aug-07 5:15 
GeneralRe: Sender vs From Pin
logicaldna28-Aug-07 4:56
logicaldna28-Aug-07 4:56 
GeneralRe: Sender vs From Pin
Scott Dorman28-Aug-07 5:23
professionalScott Dorman28-Aug-07 5:23 
GeneralRe: Sender vs From Pin
logicaldna28-Aug-07 5:31
logicaldna28-Aug-07 5:31 
QuestionRead a 3 Column CSV data in to a Datatable [modified] Pin
kibromg28-Aug-07 1:27
kibromg28-Aug-07 1:27 
AnswerRe: Read a 3 Column CSV data in to a Datatable Pin
Spacix One28-Aug-07 3:01
Spacix One28-Aug-07 3:01 
GeneralRe: Read a 3 Column CSV data in to a Datatable Pin
kibromg28-Aug-07 3:43
kibromg28-Aug-07 3:43 
AnswerRe: Read a 3 Column CSV data in to a Datatable Pin
Spacix One28-Aug-07 8:57
Spacix One28-Aug-07 8:57 
GeneralRe: Read a 3 Column CSV data in to a Datatable Pin
Spacix One29-Aug-07 5:20
Spacix One29-Aug-07 5:20 
QuestionWinForms designer bug? Pin
Lutosław28-Aug-07 0:50
Lutosław28-Aug-07 0:50 
QuestionLoading Data into SQL Tables using C# Pin
jtstanishfwg28-Aug-07 0:20
jtstanishfwg28-Aug-07 0:20 
QuestionModify The Database Name in app.config at run time Pin
BhuMan28-Aug-07 0:08
BhuMan28-Aug-07 0:08 
AnswerRe: Modify The Database Name in app.config at run time Pin
Vasudevan Deepak Kumar28-Aug-07 1:20
Vasudevan Deepak Kumar28-Aug-07 1:20 
GeneralRe: Modify The Database Name in app.config at run time Pin
Big Daddy Farang28-Aug-07 4:41
Big Daddy Farang28-Aug-07 4:41 
AnswerRe: Modify The Database Name in app.config at run time Pin
Vikram A Punathambekar28-Aug-07 2:18
Vikram A Punathambekar28-Aug-07 2:18 
QuestionFocus Pin
Assaf8227-Aug-07 23:54
Assaf8227-Aug-07 23:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.