Friday 11 June 2010

Email : reply-to in headers

IDEA : recipient will reply to specific address, not the sender.

Note: in headers email, X-parameter denotes this parameter is inserted by human.


>>>>>>>>>
To add the Reply-To header to an email, you need to use the MailMessage.Headers property. For example:

mail.Headers.Add( "Reply-To", "alternate_email@mycompany.com")

The following code snippet demonstrates this technique.

[ C# ]

MailMessage mail = new MailMessage();
mail.To = "me@mycompany.com";
mail.From = "you@yourcompany.com";
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body.";
mail.Headers.Add( "Reply-To", "alternate_email@mycompany.com" );
SmtpMail.SmtpServer = "localhost"; //your real server goes here
SmtpMail.Send( mail );


[ VB.NET ]

Dim mail As New MailMessage()
mail.To = "me@mycompany.com"
mail.From = "you@yourcompany.com"
mail.Subject = "this is a test email."
mail.Body = "this is my test email body."
mail.Headers.Add("Reply-To", "alternate_email@mycompany.com")
SmtpMail.SmtpServer = "localhost" 'your real server goes here
SmtpMail.Send(mail)


Reference : http://www.systemwebmail.com/faq/2.7.aspx


LOTUS NOTES:

In new email creation, go to delivery options - advance - reply this memo to.....

No comments:

Post a Comment