473,671 Members | 2,171 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 1479
Try:

<%
sLogonuser = Request.ServerV ariables("AUTH_ USER")
sUsername = Split(sLogonuse r & "\")(0)
sFrom = sUsername & "@yourdomainnam e.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*******@yaho o.com> wrote in message
news:OL******** ******@TK2MSFTN GP10.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 "@yourdomainnam e.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******** ********@TK2MSF TNGP09.phx.gbl. ..
Try:

<%
sLogonuser = Request.ServerV ariables("AUTH_ USER")
sUsername = Split(sLogonuse r & "\")(0)
sFrom = sUsername & "@yourdomainnam e.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*******@yaho o.com> wrote in message
news:OL******** ******@TK2MSFTN GP10.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*******@yaho o.com> wrote in message
news:%2******** *******@TK2MSFT NGP12.phx.gbl.. .
Thanks "Ray at home", but the username plus "@yourdomainnam e.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******** ********@TK2MSF TNGP09.phx.gbl. ..
Try:

<%
sLogonuser = Request.ServerV ariables("AUTH_ USER")
sUsername = Split(sLogonuse r & "\")(0)
sFrom = sUsername & "@yourdomainnam e.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*******@yaho o.com> wrote in message
news:OL******** ******@TK2MSFTN GP10.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
1476
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 is your favorite color?</question> </questionset> <answerset time="some_unique_time"> <answer question="yourname">FLEB the Amazing</answer>
1
2450
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; client wants the results from the quiz to go into the email. The file "quizconfig.js" parses the form-submitted test results & the test results page (quiz1_results.htm), in turn, shows the score. The JS in the quizconfig.js appears to set a...
9
2057
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 a function with signature "void f(ref object obj)" gives a compile error -- why (This is part of solving the original problem posed here: http://www.csharp-station.com/ShowPost.aspx?PostID=3625 What I need now is a method that accepts a ref to an...
12
18221
by: tarmat | last post by:
sorry for this silly little question, but whats the function to grab the sign of a value?
7
11484
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 entered/updated. I tried using just 123-45-6789, and SQL2005 doesn't seem to be defaulting to this value, it seems to be keeping it as (((123)-(45))-(6789), and not placing it into this column when a new row is created....
29
5087
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: 65,535. But i'm trying to write a program to test this, assuming I didn't know this number in advance. I came up with the following but have two questions. Maybe someone can help? using System; using System.Collections.Generic; using System.Text;
21
2397
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 C++ Standard: "" "...sequence of operators and operands that specifies a computation...". That means to me that an expression can be "executed". I am purposely
1
2597
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 to signup page again, however, this time they go back, all the correct value will be remain. how should i achieve this. my current code for singup.php is like this <html> <head> <link rel="stylesheet" type="text/css" href="gallery.css" />
1
1802
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 i am dealling with an educational project like online exam (MCQ) and i am facing some problems for sending radio values to the submitted page. Every question have 4 possible radio value. Questions are retrieved in the page by matching questions...
1
4076
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 hotspots on the image. One being correct(a) and the other incorrect(b). When the user clicks on the correct hotspot or place on the image, it should score and retain that value until the end of the quiz. At the end of the quiz, there is a submit button...
0
8393
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8914
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8820
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8598
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8670
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7433
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2810
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 we have to send another system
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.