Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2005
    Posts
    3

    Unanswered: 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.

  2. #2
    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?
    Last edited by pramsey; 12-05-05 at 17:18.
    Programming/Web Design
    http://eofficeprofessionals.com/forums

    Offer solutions-not criticism.

  3. #3
    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.

  4. #4
    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.

  5. #5
    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.

  6. #6
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •