How do I?

H

HartSA

I have an ASP page that I created, nothing special, it is just a form that
takes input from the user and it sends the results to a pre-specified
mailbox.

Here is my dilema, hopefully someone can assist.

The input from the users goes into the e-mail no problem, it sends fine. I
have the below code that grabs IP address and UserInformation. How do I
pass this information in the e-mail as well?

<%
response.write "<div align=center>"
response.write "<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0>" & vbcrlf
response.write "<TR>" & vbcrlf

response.write "<TD align=center BGCOLOR=#990033 WIDTH=200>" & vbcrlf
response.write("<FONT COLOR=WHITE><STRONG>IP Address")
response.write "</TD>" & vbcrlf
response.write "<TD align=center BGCOLOR=#990033 WIDTH=200>" & vbcrlf
response.write("<FONT COLOR=WHITE><STRONG>Domain\Network Login")
response.write "</TD>" & vbcrlf
response.write "</TR>" & vbcrlf

IP_address = Request.ServerVariables("REMOTE_ADDR")
LogonUser = Request.ServerVariables("REMOTE_USER")

response.write "<TR>" & vbcrlf
response.write "<TD align=center width=200>" & vbcrlf
response.write(IP_address)
response.write "</TD>" & vbcrlf

response.write "<TD align=center width=200>" & vbcrlf
response.write(LogonUser)
response.write "</TD>" & vbcrlf

response.write "</TR>" & vbcrlf
response.write "</TABLE>" & vbcrlf
response.write "</div>"

%>

I want to pass IP_address and LogonUser.

Thanks in advance for any assistance you might be able to provide. The rest
of the code is straight HTML.
 
A

Aaron [SQL Server MVP]

Did you try

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

Make sure this is AFTER the <form ... > tag and before the </form> tag.
 
H

HartSA

I didn't attach the e-mail piece. I am using sendmail.asp.
I just need to pass the IP address which is taken from VBScript and put that
in e-mail.

This is what the user inputs and get sent by e-mail now (this works fine).

Office: SY

Problem Type: WORD

Corporate Systems ID: N/A

Description of Problem: This is yet another test of the application

IMS ID: N/A

Claim Number: N/A



I have HTML INPUT statements that gather the above information. Can I
incorporate the VBSCRIPT piece into HTML somehow?
 
D

Dthmtlgod666

I will give that a try. Thanks

Aaron said:
Did you try

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

Make sure this is AFTER the <form ... > tag and before the </form> tag.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top