Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
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
 
Old September 21st, 2006, 09:00 AM
Authorized User
 
Join Date: Jun 2006
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old September 21st, 2006, 09:17 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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.
 
Old September 21st, 2006, 10:19 AM
Authorized User
 
Join Date: Jun 2006
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i guess it is identification of sender. I donnow more than that.

Rams
 
Old September 22nd, 2006, 09:58 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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.
 
Old September 22nd, 2006, 02:12 PM
Authorized User
 
Join Date: Jun 2006
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes, but how do we set x-sender? is there any property or method? Any idea?

Rams
 
Old September 22nd, 2006, 03:49 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.net - Object reference not set to an instance JCCDEVEL ASP.NET 2.0 Basics 1 August 30th, 2008 09:25 AM
How can I set TextBox value from asp.net Listbox, vishnu108mishra ASP.NET 2.0 Professional 1 March 10th, 2008 06:11 AM
set the Tabindex Of ASP.net controls on MAC machin sudhirikke ASP.NET 2.0 Basics 0 May 17th, 2006 10:04 AM
Build Frame set in ASP.NET mistry_bhavin General .NET 1 February 24th, 2005 02:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.