Sunday help please!

Discussion in 'ASP General' started by Oli, Feb 1, 2004.

  1. Oli

    Oli Guest

    Morning,

    I hope someone can help. I'm very new at this ASP, a slow learner but
    getting there slowly.

    Here is my code....

    <form method="post" action="index4.asp">
    <%
    for x=1 to request.form.count()
    response.write "<input type='hidden' name='"&request.form.key(x)&"'
    value='"&request.form.key(x)&"'>"
    response.write "<input type='hidden' name="&request.form.item(x)&"'
    value='"&request.form.item(x)&"'><P>"
    next
    %>
    <input type="submit" name="submit" value="submit">

    </form>

    What I need is for an email to be sent to me with that in bascially. I hope
    you understand? How do I do this? I know how do get ASP to send an email
    but it;s when it needs to insert those values?

    Many thanks in advance,
    Oli
     
    Oli, Feb 1, 2004
    #1
    1. Advertising

  2. Oli

    Bob Barrows Guest

    Oli wrote:
    > Morning,
    >
    > I hope someone can help. I'm very new at this ASP, a slow learner but
    > getting there slowly.
    >
    > Here is my code....

    <snip>

    Before I look at the code, could you tell me what the immediate problem is?
    Are you getting an error message? If so, what is it? Is the wrong behavior
    occurring? If so, what behavior do you expect, and what behavior are you
    getting?

    >
    > What I need is for an email to be sent to me with that in bascially.


    I do not understand this sentence.

    > I hope you understand? How do I do this? I know how do get ASP to
    > send an email but it;s when it needs to insert those values?
    >


    I do not know what you mean by " ... send an email but it;s when it needs to
    insert those values?"

    One thing you should get used to doing is response.writing your form values
    for debugging purposes:

    response.write "For debugging:<BR>"
    for each x in request.form
    response.write x & ": " & request.form(x) & "<BR>"
    next
    response.write "End debugging<BR>"

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows, Feb 1, 2004
    #2
    1. Advertising

  3. Oli

    Rob Greene Guest

    Here is some sample code that sends email. The process is to create a CDO
    object and set the parameters in that object. I think this needs smtp
    working on your machine.

    -rwg

    <HTML>
    <BODY>
    <%

    Dim MyMail
    Set MyMail = Server.CreateObject("CDO.Message")
    MyMail.From = Request.form.item(x)
    MyMail.To = ""
    MyMail.Cc = ""
    MyMail.Bcc = ""
    MyMail.Subject = "Testmail"
    MyMail.TextBody = "<H1><i>the Syreens</i></h1>Bla Bla Bla"
    MyMail.AddAttachment ""
    MyMail.Fields("urn:schemas:httpmail:importance").Value = 1
    MyMail.Fields.Update()
    MyMail.Send()
    Set MyMail = Nothing

    %>
    </BODY>
    </HTML>
     
    Rob Greene, Feb 2, 2004
    #3
    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.
Similar Threads
  1. TaeHo Yoo
    Replies:
    2
    Views:
    441
    David
    Oct 24, 2003
  2. KK
    Replies:
    2
    Views:
    596
    Big Brian
    Oct 14, 2003
  3. Guido van Rossum
    Replies:
    0
    Views:
    276
    Guido van Rossum
    Jan 30, 2004
  4. Replies:
    0
    Views:
    265
  5. U S Contractors Offering Service A Non-profit

    [ finding help fast [Invitation] This Sunday the 26th 2006 there will be Music

    U S Contractors Offering Service A Non-profit, Nov 22, 2006, in forum: C Programming
    Replies:
    0
    Views:
    302
    U S Contractors Offering Service A Non-profit
    Nov 22, 2006
Loading...

Share This Page