473,513 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP / Value Question

Maybe there is an easy to do this. I am trying to send the results of a
form to our support mailbox. This works, but I have to provide it with a
static MailFrom.

I would like the From to be from the person who submitted the form.

Any insight? Our exchange server accepts a users Windows Logon, so I can
provide that and it should work.

I have a VBscript command that pulls that info plus the Doman into a string,
I can grab a substring of this to grab the UserID.

response.write "<input type=hidden name=User value='" & right(LogonUser,7) &
"'>"

Can I send this variable to this command somehow?
<input type=hidden name=mailfrom value=??????>

TIA

Jul 19 '05 #1
3 1467
Try:

<%
sLogonuser = Request.ServerVariables("AUTH_USER")
sUsername = Split(sLogonuser & "\")(0)
sFrom = sUsername & "@yourdomainname.com"
%>

You don't have to put this value in a hidden input. If you do that, clever
people can spoof the from address. Instead, use the code above to generate
the From address for your mail object.

Ray at home

"Dvan" <dt*******@yahoo.com> wrote in message
news:OL**************@TK2MSFTNGP10.phx.gbl...
Maybe there is an easy to do this. I am trying to send the results of a
form to our support mailbox. This works, but I have to provide it with a
static MailFrom.

I would like the From to be from the person who submitted the form.

Any insight? Our exchange server accepts a users Windows Logon, so I can
provide that and it should work.

I have a VBscript command that pulls that info plus the Doman into a string, I can grab a substring of this to grab the UserID.

response.write "<input type=hidden name=User value='" & right(LogonUser,7) & "'>"

Can I send this variable to this command somehow?
<input type=hidden name=mailfrom value=??????>

TIA

Jul 19 '05 #2
Thanks "Ray at home", but the username plus "@yourdomainname.com"
will not work with my Exchange Server, it has to be either the Network ID
by itself or the format needs to be in fi****************@yourdomain.com

"Ray Costanzo [MVP]" <myfirstname at lane34 dot com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Try:

<%
sLogonuser = Request.ServerVariables("AUTH_USER")
sUsername = Split(sLogonuser & "\")(0)
sFrom = sUsername & "@yourdomainname.com"
%>

You don't have to put this value in a hidden input. If you do that, clever people can spoof the from address. Instead, use the code above to generate the From address for your mail object.

Ray at home

"Dvan" <dt*******@yahoo.com> wrote in message
news:OL**************@TK2MSFTNGP10.phx.gbl...
Maybe there is an easy to do this. I am trying to send the results of a
form to our support mailbox. This works, but I have to provide it with a static MailFrom.

I would like the From to be from the person who submitted the form.

Any insight? Our exchange server accepts a users Windows Logon, so I can provide that and it should work.

I have a VBscript command that pulls that info plus the Doman into a string,
I can grab a substring of this to grab the UserID.

response.write "<input type=hidden name=User value='" &

right(LogonUser,7) &
"'>"

Can I send this variable to this command somehow?
<input type=hidden name=mailfrom value=??????>

TIA


Jul 19 '05 #3
You need to take the username, and from that, extract the person's e-mail
address from your Active Directory. Is that what you're saying?

Look at this sample code:
http://groups.google.com/groups?selm...ftngp12&rnum=4

Ray at home

"Dvan" <dt*******@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Thanks "Ray at home", but the username plus "@yourdomainname.com"
will not work with my Exchange Server, it has to be either the Network ID
by itself or the format needs to be in fi****************@yourdomain.com

"Ray Costanzo [MVP]" <myfirstname at lane34 dot com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Try:

<%
sLogonuser = Request.ServerVariables("AUTH_USER")
sUsername = Split(sLogonuser & "\")(0)
sFrom = sUsername & "@yourdomainname.com"
%>

You don't have to put this value in a hidden input. If you do that, clever
people can spoof the from address. Instead, use the code above to

generate
the From address for your mail object.

Ray at home

"Dvan" <dt*******@yahoo.com> wrote in message
news:OL**************@TK2MSFTNGP10.phx.gbl...
Maybe there is an easy to do this. I am trying to send the results of a form to our support mailbox. This works, but I have to provide it
with a static MailFrom.

I would like the From to be from the person who submitted the form.

Any insight? Our exchange server accepts a users Windows Logon, so I can provide that and it should work.

I have a VBscript command that pulls that info plus the Doman into a

string,
I can grab a substring of this to grab the UserID.

response.write "<input type=hidden name=User value='" &

right(LogonUser,7)
&
"'>"

Can I send this variable to this command somehow?
<input type=hidden name=mailfrom value=??????>

TIA



Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1466
by: FLEB | last post by:
Okay, so I've got this XML: <qa> <questionset> <question name="yourname">What is your name?</question> <question name="yourquest">What is your quest?</question> <question name="favcolor"> What...
1
2438
by: Display Name | last post by:
Used one of these canned scripts to set up a JS quiz but not before having used another canned PHP script for "Tell your friend about this Web page!" sort of thing. Now i've gotta integrate them;...
9
2048
by: Andrew | last post by:
It seems that in C#, given an instance "a" of some value type "A", one can pass a by reference to functions with signatures of either "void f(object obj)" or "void g(ref A obj)". But passing a into...
12
18201
by: tarmat | last post by:
sorry for this silly little question, but whats the function to grab the sign of a value?
7
11466
by: tlyczko | last post by:
I have a char(11) for SSN, and I would like to default it to 123-45-6789 so I can avoid having nulls in this column, and so I can easily find the rows in which I need to have a 'correct' SSN...
29
5056
by: garyusenet | last post by:
I'm trying to investigate the maximum size of different variable types. I'm using INT as my starting variable for exploration. I know that the maximum number that the int variable can take is:...
21
2373
by: Steven T. Hatton | last post by:
I'm trying to improve my formal understanding of C++. One significant part of that effort involves clarifying my understanding of the vocabulary used to describe the language. This is from the...
1
2565
by: kang jia | last post by:
hi currently i am editing signup page, when user enter deupicated NRIC and click signup, they will go to do_signuppage and read the error message and then after 5 seconds, they will be redirected...
1
1798
by: ahmurad | last post by:
Dear all, I am new group user, computer science graduate; just have joined this established group and thanks to all. I am working in network field but so much interested in web (PHP) field. Recently...
1
4068
by: sourcie | last post by:
I am changing an existing quiz found on "JavaScriptKit.com Multiple Choice Quiz" I have an image. Instead of using the radio buttons with the normal true/false question, I want to place two...
0
7160
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7537
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7099
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5685
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3233
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1594
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.