USING IIS 5.1, and Windows XP pro, the following form works on my system,
and I can use as many form elements as I wish, as long as all form elements
have the same name: "words", in this example.

Help -- why can`t I give each form element a different name? Any
suggestions will be gratefully appreciated.

Also,See example at very bottom of something that once worked on a remote
server, but doesn't on IIS 5.1, windows xp pro



<%@LANGUAGE="VBSCRIPT"%>
<%
Dim MyMail
Set MyMail = Server.CreateObject("CDO.Message")
MyMail.TextBody = Request.Form("words")
MyMail.From = "postmaster@localhost"
MyMail.To = "postmaster@localhost"
MyMail.Subject = "CDOSYS for Windows 2000/XP"
MyMail.Send()
Set MyMail = Nothing
%>

<HTML>


<FORM NAME="TextBody" METHOD="post" ACTION="gusto44444444.asp">
<P><BR>
<input type="text" NAME= "words" ID="words" COLS="28" ROWS="1">
Name <br>
<input type="text" NAME= "words" ID="words" COLS="28" ROWS="1">
<SPAN CLASS="book_antigua">E-Mail</SPAN><BR CLEAR="all">
<input type="text" name= "words" id="words" cols="28" rows="1">
Phone</P>
<BR>

<TEXTAREA NAME = "words" ID="words" COLS="18" ROWS="2"
wrap="VIRTUAL"></TEXTAREA>
<SPAN CLASS="book_antigua">Write Here </SPAN><BR CLEAR="all">
<P>
<INPUT TYPE="submit" NAME="Submit" VALUE="Submit, e-mail required"
ALIGN="DEFAULT">
<input type="reset" name="Reset" value="Reset">
</P>
<P>
</P>
<P>

</P>
</FORM>
<%
dim words
words=Request.Form("words")
If words<>"" Then
Response.Write("Thanks " & words & "!<br />")
Response.Write("We'll respond soon")
End If
%>




EXAMPLE AT BOTTOM -- WORKED IN PAST

BUT NOT NOW

Dim myMail
Set myMail = Server.CreateObject("CDONTS.NewMail")

Request.Form("email1")
Request.Form("name")
Request.Form("phone")
Request.Form("words")

Re: Request.Form 'and' cdo.message by Ray

Ray
Wed May 10 14:44:10 CDT 2006

You can name your form fields whatever you want, and then access them by
Request.Form("nameOfInput")

MyMail.TextBody = Request.Form("input1") & vbCrLf & Request.Form("input2")

Ray at work

"whyyyy" <whyyyy@discussions.microsoft.com> wrote in message
news:10751519-BA71-44BF-BCE9-43C535DCD95E@microsoft.com...
> USING IIS 5.1, and Windows XP pro, the following form works on my system,
> and I can use as many form elements as I wish, as long as all form
> elements
> have the same name: "words", in this example.
>
> Help -- why can`t I give each form element a different name? Any
> suggestions will be gratefully appreciated.
>
> Also,See example at very bottom of something that once worked on a remote
> server, but doesn't on IIS 5.1, windows xp pro
>
>
>
> <%@LANGUAGE="VBSCRIPT"%>
> <%
> Dim MyMail
> Set MyMail = Server.CreateObject("CDO.Message")
> MyMail.TextBody = Request.Form("words")
> MyMail.From = "postmaster@localhost"
> MyMail.To = "postmaster@localhost"
> MyMail.Subject = "CDOSYS for Windows 2000/XP"
> MyMail.Send()
> Set MyMail = Nothing
> %>



Re: Request.Form 'and' cdo.message by Aaron

Aaron
Wed May 10 14:54:09 CDT 2006

You're directly assigning the entire message body, the values of
request.form("words")

Why don't you do something like:

MessageBody = Request.Form("email1") & vbCrLf & _
Request.Form("name") & vbCrLf & _
Request.Form("phone") & vbCrLf & _
Request.Form("words")

...

MyMail.TextBody = MessageBody



The example you have at the bottom could never have worked. All you do is
create the object and then type out Request.Form("...")... this should yield
a type mismatch error or something.




"whyyyy" <whyyyy@discussions.microsoft.com> wrote in message
news:10751519-BA71-44BF-BCE9-43C535DCD95E@microsoft.com...
> USING IIS 5.1, and Windows XP pro, the following form works on my system,
> and I can use as many form elements as I wish, as long as all form
> elements
> have the same name: "words", in this example.
>
> Help -- why can`t I give each form element a different name? Any
> suggestions will be gratefully appreciated.
>
> Also,See example at very bottom of something that once worked on a remote
> server, but doesn't on IIS 5.1, windows xp pro
>
>
>
> <%@LANGUAGE="VBSCRIPT"%>
> <%
> Dim MyMail
> Set MyMail = Server.CreateObject("CDO.Message")
> MyMail.TextBody = Request.Form("words")
> MyMail.From = "postmaster@localhost"
> MyMail.To = "postmaster@localhost"
> MyMail.Subject = "CDOSYS for Windows 2000/XP"
> MyMail.Send()
> Set MyMail = Nothing
> %>
>
> <HTML>
>
>
> <FORM NAME="TextBody" METHOD="post" ACTION="gusto44444444.asp">
> <P><BR>
> <input type="text" NAME= "words" ID="words" COLS="28" ROWS="1">
> Name <br>
> <input type="text" NAME= "words" ID="words" COLS="28" ROWS="1">
> <SPAN CLASS="book_antigua">E-Mail</SPAN><BR CLEAR="all">
> <input type="text" name= "words" id="words" cols="28" rows="1">
> Phone</P>
> <BR>
>
> <TEXTAREA NAME = "words" ID="words" COLS="18" ROWS="2"
> wrap="VIRTUAL"></TEXTAREA>
> <SPAN CLASS="book_antigua">Write Here </SPAN><BR CLEAR="all">
> <P>
> <INPUT TYPE="submit" NAME="Submit" VALUE="Submit, e-mail
> required"
> ALIGN="DEFAULT">
> <input type="reset" name="Reset" value="Reset">
> </P>
> <P>
> </P>
> <P>
>
> </P>
> </FORM>
> <%
> dim words
> words=Request.Form("words")
> If words<>"" Then
> Response.Write("Thanks " & words & "!<br />")
> Response.Write("We'll respond soon")
> End If
> %>
>
>
>
>
> EXAMPLE AT BOTTOM -- WORKED IN PAST
>
> BUT NOT NOW
>
> Dim myMail
> Set myMail = Server.CreateObject("CDONTS.NewMail")
>
> Request.Form("email1")
> Request.Form("name")
> Request.Form("phone")
> Request.Form("words")
>
>
>
>
>
>



Re: Request.Form 'and' cdo.message by whyyyy

whyyyy
Wed May 10 16:51:01 CDT 2006


Many thanks, Ray

I`ll let you know how it works

& vbCrLf something new for me, as is just about everything

AL





"Ray Costanzo [MVP]" wrote:

> You can name your form fields whatever you want, and then access them by
> Request.Form("nameOfInput")
>
> MyMail.TextBody = Request.Form("input1") & vbCrLf & Request.Form("input2")
>
> Ray at work
>
> "whyyyy" <whyyyy@discussions.microsoft.com> wrote in message
> news:10751519-BA71-44BF-BCE9-43C535DCD95E@microsoft.com...
> > USING IIS 5.1, and Windows XP pro, the following form works on my system,
> > and I can use as many form elements as I wish, as long as all form
> > elements
> > have the same name: "words", in this example.
> >
> > Help -- why can`t I give each form element a different name? Any
> > suggestions will be gratefully appreciated.
> >
> > Also,See example at very bottom of something that once worked on a remote
> > server, but doesn't on IIS 5.1, windows xp pro
> >
> >
> >
> > <%@LANGUAGE="VBSCRIPT"%>
> > <%
> > Dim MyMail
> > Set MyMail = Server.CreateObject("CDO.Message")
> > MyMail.TextBody = Request.Form("words")
> > MyMail.From = "postmaster@localhost"
> > MyMail.To = "postmaster@localhost"
> > MyMail.Subject = "CDOSYS for Windows 2000/XP"
> > MyMail.Send()
> > Set MyMail = Nothing
> > %>
>
>
>

Re: Request.Form 'and' cdo.message by whyyyy

whyyyy
Wed May 10 16:55:02 CDT 2006

and thanks Aaron

"Aaron Bertrand [SQL Server MVP]" wrote:

> You're directly assigning the entire message body, the values of
> request.form("words")
>
> Why don't you do something like:
>
> MessageBody = Request.Form("email1") & vbCrLf & _
> Request.Form("name") & vbCrLf & _
> Request.Form("phone") & vbCrLf & _
> Request.Form("words")
>
> ....
>
> MyMail.TextBody = MessageBody
>
>
>
> The example you have at the bottom could never have worked. All you do is
> create the object and then type out Request.Form("...")... this should yield
> a type mismatch error or something.
>
>
>
>
> "whyyyy" <whyyyy@discussions.microsoft.com> wrote in message
> news:10751519-BA71-44BF-BCE9-43C535DCD95E@microsoft.com...
> > USING IIS 5.1, and Windows XP pro, the following form works on my system,
> > and I can use as many form elements as I wish, as long as all form
> > elements
> > have the same name: "words", in this example.
> >
> > Help -- why can`t I give each form element a different name? Any
> > suggestions will be gratefully appreciated.
> >
> > Also,See example at very bottom of something that once worked on a remote
> > server, but doesn't on IIS 5.1, windows xp pro
> >
> >
> >
> > <%@LANGUAGE="VBSCRIPT"%>
> > <%
> > Dim MyMail
> > Set MyMail = Server.CreateObject("CDO.Message")
> > MyMail.TextBody = Request.Form("words")
> > MyMail.From = "postmaster@localhost"
> > MyMail.To = "postmaster@localhost"
> > MyMail.Subject = "CDOSYS for Windows 2000/XP"
> > MyMail.Send()
> > Set MyMail = Nothing
> > %>
> >
> > <HTML>
> >
> >
> > <FORM NAME="TextBody" METHOD="post" ACTION="gusto44444444.asp">
> > <P><BR>
> > <input type="text" NAME= "words" ID="words" COLS="28" ROWS="1">
> > Name <br>
> > <input type="text" NAME= "words" ID="words" COLS="28" ROWS="1">
> > <SPAN CLASS="book_antigua">E-Mail</SPAN><BR CLEAR="all">
> > <input type="text" name= "words" id="words" cols="28" rows="1">
> > Phone</P>
> > <BR>
> >
> > <TEXTAREA NAME = "words" ID="words" COLS="18" ROWS="2"
> > wrap="VIRTUAL"></TEXTAREA>
> > <SPAN CLASS="book_antigua">Write Here </SPAN><BR CLEAR="all">
> > <P>
> > <INPUT TYPE="submit" NAME="Submit" VALUE="Submit, e-mail
> > required"
> > ALIGN="DEFAULT">
> > <input type="reset" name="Reset" value="Reset">
> > </P>
> > <P>
> > </P>
> > <P>
> >
> > </P>
> > </FORM>
> > <%
> > dim words
> > words=Request.Form("words")
> > If words<>"" Then
> > Response.Write("Thanks " & words & "!<br />")
> > Response.Write("We'll respond soon")
> > End If
> > %>
> >
> >
> >
> >
> > EXAMPLE AT BOTTOM -- WORKED IN PAST
> >
> > BUT NOT NOW
> >
> > Dim myMail
> > Set myMail = Server.CreateObject("CDONTS.NewMail")
> >
> > Request.Form("email1")
> > Request.Form("name")
> > Request.Form("phone")
> > Request.Form("words")
> >
> >
> >
> >
> >
> >
>
>
>