 |
| ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

September 21st, 2006, 09:00 AM
|
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How to set X-Sender in ASP.Net
Hi,
I am sending email using system.net.
How to set x-sender?
Dim mailMsg As New MailMessage(sFromAddress.Trim, sTo.Trim)
With mailMsg
If Not String.IsNullOrEmpty(sCC) Then .CC.Add(sCC.Trim)
If Not String.IsNullOrEmpty(sBCC) Then .Bcc.Add(sBCC.Trim)
.Subject = sSubject.Trim
.Body = sBody
.IsBodyHtml = True
End With
Try
Dim client As New SmtpClient(ConfigurationSettings.AppSettings("sMai lServer"))
client.Send(mailMsg)
I appreciate your great help.
Thanks
Rams
__________________
Rams
|
|

September 21st, 2006, 09:17 AM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
What do you mean by: x-sender?
--Stole this from a moderator
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
|
|

September 21st, 2006, 10:19 AM
|
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
i guess it is identification of sender. I donnow more than that.
Rams
|
|

September 22nd, 2006, 09:58 AM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
I think, what you mean, is the X-Sender information in the EMAIL header. In any case it will get set to the value of, in your case, sTo. (This is done automatically)
--Stole this from a moderator
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
|
|

September 22nd, 2006, 02:12 PM
|
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
yes, but how do we set x-sender? is there any property or method? Any idea?
Rams
|
|

September 22nd, 2006, 03:49 PM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
x-sender == the person the mail is to, as far as i know you can not manually set this as it is automatically set to the person your sending the meail to.
--Stole this from a moderator
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
|
|
 |