Home > Archive > ASP > September 2004 > I'm not sure if this is the right place for this but...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
I'm not sure if this is the right place for this but...
|
|
|
|
I'm having trouble with a bit of form to mail for a site I work on and
was wondering if anyone could point out where I've gone wrong.
<%
Dim t1name,t1,t2name,t2,t3name,t3,t4name,t4,
t5name,t5
t1name = "Name"
t1 = Request.Form("t1")
t2name = "Company"
t2 = Request.Form("t2")
t3name = "E-mail"
t3 = Request.Form("t3")
t4name = "Postcode"
t4 = Request.Form("t4")
t5name = "Telephone"
t5 = Request.Form("t5")
Dim st1name,st1,st2name,st2
st1name = "Address"
st1 = Request.Form("st1")
st2name = "Enquiry"
st2 = Request.Form("st2")
Dim cb1name,cb1,cb2name,cb2,cb3name,cb3,cb4n
ame,cb4
cb1name = "Farmshops"
cb1 = Request.Form("st1")
cb2name = "E-mail List"
cb2 = Request.Form("st2")
cb3name = "Advertise"
cb3 = Request.Form("st1")
cb4name = "Swap Link"
cb4 = Request.Form("st2")
Dim ObjMail
Set ObjMail = Server.CreateObject("CDONTS.NewMail")
ObjMail.To = "wwonder@skydsl.de"
'in the next line you can change that email address to something else
'like "myform@myurl.com", just be sure and put it between quotes " "
ObjMail.From = "projectteam@martcymru.com"
'you can also change "Form Submission" to something else like "form
results" etc.
ObjMail.Subject = "Contact from the Mart Cymru website"
ObjMail.Body = t1name & vbcrlf&_
t1 & vbcrlf&_
t2name & vbcrlf&_
t2 & vbcrlf&_
t3name & vbcrlf&_
t3 & vbcrlf&_
t4name & vbcrlf&_
t4 & vbcrlf&_
t5name & vbcrlf&_
t5 & vbcrlf&_
st1name & vbcrlf&_
st1 & vbcrlf&_
st2name & vbcrlf&_
st2 & vbcrlf&_
cb1name & vbcrlf&_
cb1 & vbcrlf&_
cb2name & vbcrlf&_
cb2 & vbcrlf&_
cb3name & vbcrlf&_
cb3 & vbcrlf&_
cb4name & vbcrlf&_
cb4 & vbcrlf&_
ObjMail.Send
Set ObjMail = Nothing
'HERE you make a choice. You can redirect the user to any page in your
site
Response.Redirect "http://www.martcymru.com"
'Or just say thanks. Delete the line you dont want. Either above or
below
Response.Write"Thank You"
%>
--
Hywel
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message404688.html
| |
| Curt_C [MVP] 2004-09-23, 3:55 pm |
| What's the problem/error?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Hywel" <Hywel.1d1h21@mail.webservertalk.com> wrote in message
news:Hywel.1d1h21@mail.webservertalk.com...
>
> I'm having trouble with a bit of form to mail for a site I work on and
> was wondering if anyone could point out where I've gone wrong.
>
> <%
> Dim t1name,t1,t2name,t2,t3name,t3,t4name,t4,
t5name,t5
>
> t1name = "Name"
> t1 = Request.Form("t1")
> t2name = "Company"
> t2 = Request.Form("t2")
> t3name = "E-mail"
> t3 = Request.Form("t3")
> t4name = "Postcode"
> t4 = Request.Form("t4")
> t5name = "Telephone"
> t5 = Request.Form("t5")
>
> Dim st1name,st1,st2name,st2
> st1name = "Address"
> st1 = Request.Form("st1")
> st2name = "Enquiry"
> st2 = Request.Form("st2")
>
> Dim cb1name,cb1,cb2name,cb2,cb3name,cb3,cb4n
ame,cb4
> cb1name = "Farmshops"
> cb1 = Request.Form("st1")
> cb2name = "E-mail List"
> cb2 = Request.Form("st2")
> cb3name = "Advertise"
> cb3 = Request.Form("st1")
> cb4name = "Swap Link"
> cb4 = Request.Form("st2")
>
> Dim ObjMail
> Set ObjMail = Server.CreateObject("CDONTS.NewMail")
> ObjMail.To = "wwonder@skydsl.de"
>
> 'in the next line you can change that email address to something else
> 'like "myform@myurl.com", just be sure and put it between quotes " "
>
> ObjMail.From = "projectteam@martcymru.com"
>
> 'you can also change "Form Submission" to something else like "form
> results" etc.
>
> ObjMail.Subject = "Contact from the Mart Cymru website"
>
> ObjMail.Body = t1name & vbcrlf&_
> t1 & vbcrlf&_
> t2name & vbcrlf&_
> t2 & vbcrlf&_
> t3name & vbcrlf&_
> t3 & vbcrlf&_
> t4name & vbcrlf&_
> t4 & vbcrlf&_
> t5name & vbcrlf&_
> t5 & vbcrlf&_
> st1name & vbcrlf&_
> st1 & vbcrlf&_
> st2name & vbcrlf&_
> st2 & vbcrlf&_
> cb1name & vbcrlf&_
> cb1 & vbcrlf&_
> cb2name & vbcrlf&_
> cb2 & vbcrlf&_
> cb3name & vbcrlf&_
> cb3 & vbcrlf&_
> cb4name & vbcrlf&_
> cb4 & vbcrlf&_
> ObjMail.Send
> Set ObjMail = Nothing
> 'HERE you make a choice. You can redirect the user to any page in your
> site
>
> Response.Redirect "http://www.martcymru.com"
>
> 'Or just say thanks. Delete the line you dont want. Either above or
> below
> Response.Write"Thank You"
> %>
>
>
>
> --
> Hywel
> ------------------------------------------------------------------------
> Posted via http://www.webservertalk.com
> ------------------------------------------------------------------------
> View this thread: http://www.webservertalk.com/message404688.html
>
| |
|
|
| Bob Barrows [MVP] 2004-09-27, 8:55 pm |
| Hywel wrote:
> it just won't work coming up with an unspecified 500 error
http://www.aspfaq.com/show.asp?id=2109
--
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 [MVP] wrote:
> *Hywel wrote:
>
> http://www.aspfaq.com/show.asp?id=2109
>
> --
> 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" *
allready taken into account
--
Hywel
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message404688.html
|
|
|
|
|