If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Need email.asp form to return sender IP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-05-05, 11:52
PattiM PattiM is offline
Registered User
 
Join Date: Dec 2005
Posts: 3
Need email.asp form to return sender IP

We are trying to set up an email form using email.asp. In our previous system we had a line of code that would return information to us from the sender, such as their IP address. I cannot get this to work with our new email form.

Here is the code we are using:

<form name="eMail" method="post" action="emailform.asp">

<----Removed body of form for clarity ----------->
<input type="hidden" name="email_From" value="sales@mysite.com">
<input type="hidden" name="email_To" value="sales@mysite.com">
<input type="hidden" name="email_Subject" value="Contact Form Submission">
<input type="hidden" name="email_ThankYou" value="Thank you for your email.">
<input type="hidden" name="email_Redirect" value="http://mysite.com">
<input type="hidden" name="env_report" VALUE="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT">
</form>


This is the line that used to give us the needed information: <input type="hidden" name="env_report" VALUE="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT"> I understand it does not work in this type of form, but I've been unable to determine what code would work. Has anyone here had any experience with this?

I appreciate any help anyone can give me.
Reply With Quote
  #2 (permalink)  
Old 12-05-05, 16:15
pramsey pramsey is offline
Registered User
 
Join Date: Nov 2005
Posts: 20
I've never heard of the method that you mentioned.

Here's what I do. Add this to your code to emailform.asp
Code:
DIM	REMOTE_ADDR
REMOTE_ADDR=Request.ServerVariables("REMOTE_ADDR")


Wherever it is in your form that you want the ip to appear, write
Code:
"&REMOTE_ADDR&"
How are you sending mail?
__________________
Programming/Web Design
http://eofficeprofessionals.com/forums

Offer solutions-not criticism.

Last edited by pramsey; 12-05-05 at 16:18.
Reply With Quote
  #3 (permalink)  
Old 12-05-05, 16:40
PattiM PattiM is offline
Registered User
 
Join Date: Dec 2005
Posts: 3
Thank you for the reply.

We have a website and on the site there is a Contact Us form. The visitor can type their information into the form and click submit to email the form to us without having to use their own email account to send the message.

On the form, we need to have some coding that will send us the visitors information, such as their IP address.

This is what I had added to the form earlier, but it didn't send me any information:

<%
response.write (""&HTTP_USER_AGENT&": "&Request.ServerVariables(HTTP_USER_AGENT)&"<b r/>")
response.write (""&REMOTE_ADDR&": "&Request.ServerVariables(REMOTE_ADDR)&"<br/>")
response.write (""&REMOTE_HOST&": "&Request.ServerVariables(REMOTE_HOST)&"<br/>")
%>

On our last site we had set up the code within the html of the page like this:

<input type="hidden" name="env_report" VALUE="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT">

and it worked fine.

This is a different system, and I can't figure out how to set it up.

I was hoping maybe someone knew something I didn't. Someone told me I should write a Javascript to pull the information from the visitors, but I'm lost with JS.
Reply With Quote
  #4 (permalink)  
Old 12-05-05, 16:55
pramsey pramsey is offline
Registered User
 
Join Date: Nov 2005
Posts: 20
What method does your host allow for sending mail-ASPEMail, Jmail, CDOSYS? And, can you post all of your code?
__________________
Programming/Web Design
http://eofficeprofessionals.com/forums

Offer solutions-not criticism.
Reply With Quote
  #5 (permalink)  
Old 12-06-05, 12:35
PattiM PattiM is offline
Registered User
 
Join Date: Dec 2005
Posts: 3
I called our Website hosting company back (again!) to get the answer to your question. This time the person I spoke to told me that I would have to create my own asp page in Dreamweaver and then do some other things with the database fields in order to get it to work properly.

If you can't tell, I'm very new at this. I've had a Website for six years, and it's been very successful, but the programming end just takes me a while to learn. It seems that everything keeps changing so fast. It's difficult enough to keep up with the changes on the business end of things, but when it comes to the technical I just get stuck sometimes. This is one of those times.

Why can't things just stay the same long enough for me to catch up?

Thank you for your help with this. I really appreciate that you took the time to answer me.
Reply With Quote
  #6 (permalink)  
Old 12-08-05, 10:28
pramsey pramsey is offline
Registered User
 
Join Date: Nov 2005
Posts: 20
If you still want me to help you:
I know nothing about dreamweaver. I create my sites from scratch. Did they tell you to create it in dreamweaver because they have no control panel? There are many mail forms that you can cut/paste into your page, but it all depends on what mail component you are using. Ask your host which method you can use to send mail from your site-ask them if they support ASPEMail, Jmail, CDOSYS.
__________________
Programming/Web Design
http://eofficeprofessionals.com/forums

Offer solutions-not criticism.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On