Sunday help please!

O

Oli

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
 
B

Bob Barrows

Oli said:
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>"
 
R

Rob Greene

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 = "(e-mail address removed)"
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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top