Professional Web Applications Themes

CDONTS - WebForms - Pls Help - ASP Components

I am hoping that someone can help me Here is what I want to do; I need to have a htm page that has text boxes that website visitors fill out (Form), I then want to have the results past on to this script, which then e-mails it. How do I capture the text written in the form and pass it on to a script like this, I am trying to use CDONTS or CDOSYS (I have read that CDONTS is not used on 2000 servers?), I have very limited web scripting knowledge, thanks for you help and patience with ...

  1. #1

    Default CDONTS - WebForms - Pls Help

    I am hoping that someone can help me

    Here is what I want to do; I need to have a htm page that
    has text boxes that website visitors fill out (Form), I
    then want to have the results past on to this script,
    which then e-mails it. How do I capture the text written
    in the form and pass it on to a script like this, I am
    trying to use CDONTS or CDOSYS (I have read that CDONTS is
    not used on 2000 servers?), I have very limited web
    scripting knowledge, thanks for you help and patience with
    me:

    I have an IIS server and exchange server. (2 servers)
    Virtual SMTP server on IIS configured and working. I have
    tested SMTP Virtual server by creating txt file, dropping
    it in pickup directory on mailroot - I also have the
    following script - both work . (I have tried using a Form
    Page that I created in Frontpage, but when I click on
    submit button on the webpage it keeps telling me that
    Frontpage extensions are not installed, even though I have
    installed them ! )

    Here is the script that I have tested.. Please someone..
    Thank you!


    ' testing CDOSMTP.
    Dim iMsg
    Dim iConf
    Dim Flds
    Dim strHTML

    Const cdoSendUsingPort = 2

    set iMsg = CreateObject("CDO.Message")
    set iConf = CreateObject("CDO.Configuration")

    Set Flds = iConf.Fields

    With Flds
    .Item
    ("http://schemas.microsoft.com/cdo/configuration/sendusing"
    ) = cdoSendUsingPort
    .Item
    ("http://schemas.microsoft.com/cdo/configuration/smtpserver
    ") = "10.0.0.1"
    .Item
    ("http://schemas.microsoft.com/cdo/configuration/smtpconnec
    tiontimeout") = 10
    .Update
    End With

    ' Build HTML for message body.
    strHTML = "<HTML>"
    strHTML = strHTML & "<HEAD>"
    strHTML = strHTML & "<BODY>"
    strHTML = strHTML & "<b> Please attend to my
    issue</b></br>"
    strHTML = strHTML & "</BODY>"
    strHTML = strHTML & "</HTML>"

    With iMsg
    Set .Configuration = iConf
    .To = "myselfmydomain.com"
    .From = "myselfmydomain.com"
    .Subject = "Testing CDOSMTP"
    .HTMLBody = strHTML
    .Send
    End With

    ' Cleanup
    Set iMsg = Nothing
    Set iConf = Nothing
    Set Flds = Nothing

    MsgBox "Thank you for Testing!!"
    ..


    Bjarni in Paradise Guest

  2. #2

    Default Re: CDONTS - WebForms - Pls Help

    With what you have so far, you're on the right track. It seems that the
    only thing that you're missing is getting the contents of your form. The
    way you do that is:


    strHTML = strHTML & "The person's name is " &
    Request.Form("NameOfTextBoxFromFormOnWebPage")


    So, if your form is like:
    <form method="post" action="emailthis.asp">
    What's your name? <input type="text" name="txtName">
    <input type="submit">
    </form>

    you'd do, in your ASP page:
    strHTML = strHTML & "The person's name is " &
    Request.Form("NameOfTextBoxFromFormOnWebPage")


    For your last line with the MSGBOX command, that will not work. Since the
    ASP code is running on the server, even if you could execute a msgbox, who
    would be there to see it, since it'd be on the server? You can redirect to
    another page,

    Response.Redirect "thanks.htm"

    or you can just write out one line like:

    Response.Write "Thank you for Testing!!"


    Ray at work


    "Bjarni in Paradise" <anonymousdiscussions.microsoft.com> wrote in message
    news:aac601c3ebe7$1cd3a130$a401280aphx.gbl...
    > I am hoping that someone can help me
    >
    > Here is what I want to do; I need to have a htm page that
    > has text boxes that website visitors fill out (Form), I
    > then want to have the results past on to this script,
    > which then e-mails it. How do I capture the text written
    > in the form and pass it on to a script like this, I am
    > trying to use CDONTS or CDOSYS (I have read that CDONTS is
    > not used on 2000 servers?), I have very limited web
    > scripting knowledge, thanks for you help and patience with
    > me:
    >
    > I have an IIS server and exchange server. (2 servers)
    > Virtual SMTP server on IIS configured and working. I have
    > tested SMTP Virtual server by creating txt file, dropping
    > it in pickup directory on mailroot - I also have the
    > following script - both work . (I have tried using a Form
    > Page that I created in Frontpage, but when I click on
    > submit button on the webpage it keeps telling me that
    > Frontpage extensions are not installed, even though I have
    > installed them ! )
    >
    > Here is the script that I have tested.. Please someone..
    > Thank you!
    >
    >
    > ' testing CDOSMTP.
    > Dim iMsg
    > Dim iConf
    > Dim Flds
    > Dim strHTML
    >
    > Const cdoSendUsingPort = 2
    >
    > set iMsg = CreateObject("CDO.Message")
    > set iConf = CreateObject("CDO.Configuration")
    >
    > Set Flds = iConf.Fields
    >
    > With Flds
    > .Item
    > ("http://schemas.microsoft.com/cdo/configuration/sendusing"
    > ) = cdoSendUsingPort
    > .Item
    > ("http://schemas.microsoft.com/cdo/configuration/smtpserver
    > ") = "10.0.0.1"
    > .Item
    > ("http://schemas.microsoft.com/cdo/configuration/smtpconnec
    > tiontimeout") = 10
    > .Update
    > End With
    >
    > ' Build HTML for message body.
    > strHTML = "<HTML>"
    > strHTML = strHTML & "<HEAD>"
    > strHTML = strHTML & "<BODY>"
    > strHTML = strHTML & "<b> Please attend to my
    > issue</b></br>"
    > strHTML = strHTML & "</BODY>"
    > strHTML = strHTML & "</HTML>"
    >
    > With iMsg
    > Set .Configuration = iConf
    > .To = "myselfmydomain.com"
    > .From = "myselfmydomain.com"
    > .Subject = "Testing CDOSMTP"
    > .HTMLBody = strHTML
    > .Send
    > End With
    >
    > ' Cleanup
    > Set iMsg = Nothing
    > Set iConf = Nothing
    > Set Flds = Nothing
    >
    > MsgBox "Thank you for Testing!!"
    > .
    >
    >

    Ray at Guest

  3. #3

    Default Re: CDONTS - WebForms - Pls Help

    Thanks Ray, I will try it out and post the results later

    PS I accidentally posted a new post thanking you. Sorry
    all!
    >-----Original Message-----
    >With what you have so far, you're on the right track. It
    seems that the
    >only thing that you're missing is getting the contents of
    your form. The
    >way you do that is:
    >
    >
    >strHTML = strHTML & "The person's name is " &
    >Request.Form("NameOfTextBoxFromFormOnWebPage")
    >
    >
    >So, if your form is like:
    ><form method="post" action="emailthis.asp">
    >What's your name? <input type="text" name="txtName">
    ><input type="submit">
    ></form>
    >
    >you'd do, in your ASP page:
    >strHTML = strHTML & "The person's name is " &
    >Request.Form("NameOfTextBoxFromFormOnWebPage")
    >
    >
    >For your last line with the MSGBOX command, that will not
    work. Since the
    >ASP code is running on the server, even if you could
    execute a msgbox, who
    >would be there to see it, since it'd be on the server?
    You can redirect to
    >another page,
    >
    >Response.Redirect "thanks.htm"
    >
    >or you can just write out one line like:
    >
    >Response.Write "Thank you for Testing!!"
    >
    >
    >Ray at work
    >
    >
    >"Bjarni in Paradise"
    <anonymousdiscussions.microsoft.com> wrote in message
    >news:aac601c3ebe7$1cd3a130$a401280aphx.gbl...
    >> I am hoping that someone can help me
    >>
    >> Here is what I want to do; I need to have a htm page
    that
    >> has text boxes that website visitors fill out (Form), I
    >> then want to have the results past on to this script,
    >> which then e-mails it. How do I capture the text written
    >> in the form and pass it on to a script like this, I am
    >> trying to use CDONTS or CDOSYS (I have read that CDONTS
    is
    >> not used on 2000 servers?), I have very limited web
    >> scripting knowledge, thanks for you help and patience
    with
    >> me:
    >>
    >> I have an IIS server and exchange server. (2 servers)
    >> Virtual SMTP server on IIS configured and working. I
    have
    >> tested SMTP Virtual server by creating txt file,
    dropping
    >> it in pickup directory on mailroot - I also have the
    >> following script - both work . (I have tried using a
    Form
    >> Page that I created in Frontpage, but when I click on
    >> submit button on the webpage it keeps telling me that
    >> Frontpage extensions are not installed, even though I
    have
    >> installed them ! )
    >>
    >> Here is the script that I have tested.. Please someone..
    >> Thank you!
    >>
    >>
    >> ' testing CDOSMTP.
    >> Dim iMsg
    >> Dim iConf
    >> Dim Flds
    >> Dim strHTML
    >>
    >> Const cdoSendUsingPort = 2
    >>
    >> set iMsg = CreateObject("CDO.Message")
    >> set iConf = CreateObject("CDO.Configuration")
    >>
    >> Set Flds = iConf.Fields
    >>
    >> With Flds
    >> .Item
    >>
    ("http://schemas.microsoft.com/cdo/configuration/sendusing"
    >> ) = cdoSendUsingPort
    >> .Item
    >>
    ("http://schemas.microsoft.com/cdo/configuration/smtpserver
    >> ") = "10.0.0.1"
    >> .Item
    >>
    ("http://schemas.microsoft.com/cdo/configuration/smtpconnec
    >> tiontimeout") = 10
    >> .Update
    >> End With
    >>
    >> ' Build HTML for message body.
    >> strHTML = "<HTML>"
    >> strHTML = strHTML & "<HEAD>"
    >> strHTML = strHTML & "<BODY>"
    >> strHTML = strHTML & "<b> Please attend to my
    >> issue</b></br>"
    >> strHTML = strHTML & "</BODY>"
    >> strHTML = strHTML & "</HTML>"
    >>
    >> With iMsg
    >> Set .Configuration = iConf
    >> .To = "myselfmydomain.com"
    >> .From = "myselfmydomain.com"
    >> .Subject = "Testing CDOSMTP"
    >> .HTMLBody = strHTML
    >> .Send
    >> End With
    >>
    >> ' Cleanup
    >> Set iMsg = Nothing
    >> Set iConf = Nothing
    >> Set Flds = Nothing
    >>
    >> MsgBox "Thank you for Testing!!"
    >> .
    >>
    >>
    >
    >
    >.
    >
    Bjarni in Paradise Guest

  4. #4

    Default Re: CDONTS - WebForms - Pls Help

    You're welcome and no problem. :]

    Ray at work

    "Bjarni in Paradise" <anonymousdiscussions.microsoft.com> wrote in message
    news:ae1401c3ec07$3705a970$a601280aphx.gbl...
    > Thanks Ray, I will try it out and post the results later
    >
    > PS I accidentally posted a new post thanking you. Sorry
    > all!
    > >-----Original Message-----
    > >With what you have so far, you're on the right track. It
    > seems that the
    > >only thing that you're missing is getting the contents of
    > your form. The
    > >way you do that is:
    > >
    > >
    > >strHTML = strHTML & "The person's name is " &
    > >Request.Form("NameOfTextBoxFromFormOnWebPage")
    > >
    > >
    > >So, if your form is like:
    > ><form method="post" action="emailthis.asp">
    > >What's your name? <input type="text" name="txtName">
    > ><input type="submit">
    > ></form>
    > >
    > >you'd do, in your ASP page:
    > >strHTML = strHTML & "The person's name is " &
    > >Request.Form("NameOfTextBoxFromFormOnWebPage")
    > >
    > >
    > >For your last line with the MSGBOX command, that will not
    > work. Since the
    > >ASP code is running on the server, even if you could
    > execute a msgbox, who
    > >would be there to see it, since it'd be on the server?
    > You can redirect to
    > >another page,
    > >
    > >Response.Redirect "thanks.htm"
    > >
    > >or you can just write out one line like:
    > >
    > >Response.Write "Thank you for Testing!!"
    > >
    > >
    > >Ray at work
    > >
    > >
    > >"Bjarni in Paradise"
    > <anonymousdiscussions.microsoft.com> wrote in message
    > >news:aac601c3ebe7$1cd3a130$a401280aphx.gbl...
    > >> I am hoping that someone can help me
    > >>
    > >> Here is what I want to do; I need to have a htm page
    > that
    > >> has text boxes that website visitors fill out (Form), I
    > >> then want to have the results past on to this script,
    > >> which then e-mails it. How do I capture the text written
    > >> in the form and pass it on to a script like this, I am
    > >> trying to use CDONTS or CDOSYS (I have read that CDONTS
    > is
    > >> not used on 2000 servers?), I have very limited web
    > >> scripting knowledge, thanks for you help and patience
    > with
    > >> me:
    > >>
    > >> I have an IIS server and exchange server. (2 servers)
    > >> Virtual SMTP server on IIS configured and working. I
    > have
    > >> tested SMTP Virtual server by creating txt file,
    > dropping
    > >> it in pickup directory on mailroot - I also have the
    > >> following script - both work . (I have tried using a
    > Form
    > >> Page that I created in Frontpage, but when I click on
    > >> submit button on the webpage it keeps telling me that
    > >> Frontpage extensions are not installed, even though I
    > have
    > >> installed them ! )
    > >>
    > >> Here is the script that I have tested.. Please someone..
    > >> Thank you!
    > >>
    > >>
    > >> ' testing CDOSMTP.
    > >> Dim iMsg
    > >> Dim iConf
    > >> Dim Flds
    > >> Dim strHTML
    > >>
    > >> Const cdoSendUsingPort = 2
    > >>
    > >> set iMsg = CreateObject("CDO.Message")
    > >> set iConf = CreateObject("CDO.Configuration")
    > >>
    > >> Set Flds = iConf.Fields
    > >>
    > >> With Flds
    > >> .Item
    > >>
    > ("http://schemas.microsoft.com/cdo/configuration/sendusing"
    > >> ) = cdoSendUsingPort
    > >> .Item
    > >>
    > ("http://schemas.microsoft.com/cdo/configuration/smtpserver
    > >> ") = "10.0.0.1"
    > >> .Item
    > >>
    > ("http://schemas.microsoft.com/cdo/configuration/smtpconnec
    > >> tiontimeout") = 10
    > >> .Update
    > >> End With
    > >>
    > >> ' Build HTML for message body.
    > >> strHTML = "<HTML>"
    > >> strHTML = strHTML & "<HEAD>"
    > >> strHTML = strHTML & "<BODY>"
    > >> strHTML = strHTML & "<b> Please attend to my
    > >> issue</b></br>"
    > >> strHTML = strHTML & "</BODY>"
    > >> strHTML = strHTML & "</HTML>"
    > >>
    > >> With iMsg
    > >> Set .Configuration = iConf
    > >> .To = "myselfmydomain.com"
    > >> .From = "myselfmydomain.com"
    > >> .Subject = "Testing CDOSMTP"
    > >> .HTMLBody = strHTML
    > >> .Send
    > >> End With
    > >>
    > >> ' Cleanup
    > >> Set iMsg = Nothing
    > >> Set iConf = Nothing
    > >> Set Flds = Nothing
    > >>
    > >> MsgBox "Thank you for Testing!!"
    > >> .
    > >>
    > >>
    > >
    > >
    > >.
    > >

    Ray at Guest

Similar Threads

  1. deleting DB & tables via webforms
    By Harag in forum ASP Database
    Replies: 5
    Last Post: July 29th, 10:42 AM
  2. Webforms and HotKeys
    By Shahram Khosraviani in forum ASP.NET General
    Replies: 0
    Last Post: July 15th, 11:56 PM
  3. Embedding Webforms
    By PsiMan in forum ASP.NET General
    Replies: 1
    Last Post: July 9th, 04:28 PM
  4. HELP - WebForms as HttpResponseHandlers
    By MD Cobb in forum ASP.NET General
    Replies: 0
    Last Post: June 27th, 04:24 PM
  5. WebForms as HttpResponseHandlers?
    By Marcus Cobb in forum ASP.NET General
    Replies: 0
    Last Post: June 27th, 02:37 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139