How do I?

Discussion in 'ASP General' started by HartSA, Aug 20, 2004.

  1. HartSA

    HartSA Guest

    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.
     
    HartSA, Aug 20, 2004
    #1
    1. Advertising

  2. 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.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "HartSA" <> wrote in message
    news:...
    > 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.
    >
    >
    >
    >
     
    Aaron [SQL Server MVP], Aug 20, 2004
    #2
    1. Advertising

  3. HartSA

    HartSA Guest

    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?




    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:...
    > not sure I follow... what you have here has nothing to do with an

    e-mail....
    > This only writes out to the screen. You'll have to put this all into a
    > string and use that for the .Body of the the e-mail.
    >
    > Is that what you are asking?
    >
    > Curt
    >
    > "HartSA" <> wrote in message
    > news:...
    > >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.
    > >
    > >
    > >
    > >

    >
    >
     
    HartSA, Aug 20, 2004
    #3
  4. HartSA

    Dthmtlgod666 Guest

    I will give that a try. Thanks

    "Aaron [SQL Server MVP]" <> wrote in message
    news:%23o%...
    > 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.
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
    >
    >
    > "HartSA" <> wrote in message
    > news:...
    >> 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.
    >>
    >>
    >>
    >>

    >
    >
     
    Dthmtlgod666, Aug 20, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page