Current location: Hot Scripts Forums » Programming Languages » ASP » ASP JMAIL Form Email does not submit nor redirect


ASP JMAIL Form Email does not submit nor redirect

Reply
  #1 (permalink)  
Old 02-26-04, 12:44 PM
progtalktn progtalktn is offline
New Member
 
Join Date: Feb 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ASP JMAIL Form Email does not submit nor redirect

Greetings-

I just made an .ASP form page with the "submit" button to email me all form fields. I am using JMAIL template on this.

However, when clicking the submit button, it does not submit to email nor does in redirect to my thank you page.

thanks in advance!
reference: (http://www.hummingbirdproductions.co...ct/contact.asp)

Here's my code on my form:

<form method="Post" action="get.asp">
<p>Name<br>
<input type="text" name="t1" size="20">
<br>
Phone<br>
<input type="text" name="t2" size="20">
<br>
Email<br>
<input type="text" name="t3" size="20">
<br>
Address<br>
<input type="text" name="t4" size="20">
<br>
<input name="t5" type="text" id="t5" size="20">
<br>
City<br>
<input name="t6" type="text" id="t6" size="20">
<br>
State<br>
<input name="t7" type="text" id="t7" size="20">
<br>
Zip<br>
<input name="t8" type="text" id="t8" size="20">
</p>
<p>
Comment<br>
<textarea rows="4" name="st" cols="50"></textarea>
<p>
<input type="checkbox" name="checkbox" value="checkbox">
Check this box to receive our newsletter.
<p>
<input type=submit value=Submit>
<input name="Reset" type="submit" id="Reset" value="Reset">
</form></td>

Here's my code for my "get.asp" file:

<%
Dim t1name,t1,t2name,t2,t3name,t3,t4name,t4
t1name = "Name"
t1 = Request.Form("t1")
t2name = "Phone"
t2 = Request.Form("t2")
t3name = "Email"
t3 = Request.Form("t3")
t4name = "Address"
t4 = Request.Form("t4")
t5name = "Address2"
t5 = Request.Form("t5")
t6name = "City"
t6 = Request.Form("t6")
t7name = "State"
t7 = Request.Form("t7")
t8name = "Zip"
t8 = Request.Form("t8")
Dim stname,st
stname = "Comment"
st = Request.Form("st")
Set JMail = Server.CreateObject("JMail.SMTPMail")
'Change this line to the address of your
'email server. Something like this: mail.yoursite.com:25
JMail.ServerAddress = "mail.artfilgo.com"

JMail.AddRecipient "tristam@artfilgo.com"
'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 " "
JMail.Sender = "tristam@artfilgo.com"
'you can also change "Form Submission" to something else like "form results" etc.
JMail.Subject = "Information requested from Hummbird.com"
JMail.Body = t1name & vbcrlf&_
t1 & vbcrlf&_
t2name & vbcrlf&_
t2 & vbcrlf&_
t3name & vbcrlf&_
t3 & vbcrlf&_
t4name & vbcrlf&_
t4 & vbcrlf&_
stname & vbcrlf&_
st
JMail.Execute
'HERE you make a choice. You can Redirect the user to any page in your site
Response.direct "http://hummingbirdproductions.com/contact/thankyou/thankyou.asp"
'Or just say thanks. Delete the line you dont want. Either above or below
Response.Write"Thank You"
%>
Reply With Quote
  #2 (permalink)  
Old 02-26-04, 04:41 PM
af11kcc's Avatar
af11kcc af11kcc is offline
Newbie Coder
 
Join Date: Sep 2003
Location: MX
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Do yo get this error?

Microsoft VBScript compilation error '800a03f2'

Expected identifier

/contact/get.asp, line 2

Dim t1name,t1,t2name,t2,t3name,t3,t4name,t4,t5name,t5, t6name,t6,t7name,t7,t8name,t8,
------------------------------------------------------------------------------------^

Quote:
Originally Posted by progtalktn
Greetings-

I just made an .ASP form page with the "submit" button to email me all form fields. I am using JMAIL template on this.

However, when clicking the submit button, it does not submit to email nor does in redirect to my thank you page.

thanks in advance!
reference: (http://www.hummingbirdproductions.co...ct/contact.asp)

Here's my code on my form:

<form method="Post" action="get.asp">
<p>Name<br>
<input type="text" name="t1" size="20">
<br>
Phone<br>
<input type="text" name="t2" size="20">
<br>
Email<br>
<input type="text" name="t3" size="20">
<br>
Address<br>
<input type="text" name="t4" size="20">
<br>
<input name="t5" type="text" id="t5" size="20">
<br>
City<br>
<input name="t6" type="text" id="t6" size="20">
<br>
State<br>
<input name="t7" type="text" id="t7" size="20">
<br>
Zip<br>
<input name="t8" type="text" id="t8" size="20">
</p>
<p>
Comment<br>
<textarea rows="4" name="st" cols="50"></textarea>
<p>
<input type="checkbox" name="checkbox" value="checkbox">
Check this box to receive our newsletter.
<p>
<input type=submit value=Submit>
<input name="Reset" type="submit" id="Reset" value="Reset">
</form></td>

Here's my code for my "get.asp" file:

<%
Dim t1name,t1,t2name,t2,t3name,t3,t4name,t4
t1name = "Name"
t1 = Request.Form("t1")
t2name = "Phone"
t2 = Request.Form("t2")
t3name = "Email"
t3 = Request.Form("t3")
t4name = "Address"
t4 = Request.Form("t4")
t5name = "Address2"
t5 = Request.Form("t5")
t6name = "City"
t6 = Request.Form("t6")
t7name = "State"
t7 = Request.Form("t7")
t8name = "Zip"
t8 = Request.Form("t8")
Dim stname,st
stname = "Comment"
st = Request.Form("st")
Set JMail = Server.CreateObject("JMail.SMTPMail")
'Change this line to the address of your
'email server. Something like this: mail.yoursite.com:25
JMail.ServerAddress = "mail.artfilgo.com"

JMail.AddRecipient "tristam@artfilgo.com"
'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 " "
JMail.Sender = "tristam@artfilgo.com"
'you can also change "Form Submission" to something else like "form results" etc.
JMail.Subject = "Information requested from Hummbird.com"
JMail.Body = t1name & vbcrlf&_
t1 & vbcrlf&_
t2name & vbcrlf&_
t2 & vbcrlf&_
t3name & vbcrlf&_
t3 & vbcrlf&_
t4name & vbcrlf&_
t4 & vbcrlf&_
stname & vbcrlf&_
st
JMail.Execute
'HERE you make a choice. You can Redirect the user to any page in your site
Response.direct "http://hummingbirdproductions.com/contact/thankyou/thankyou.asp"
'Or just say thanks. Delete the line you dont want. Either above or below
Response.Write"Thank You"
%>
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
formmail problem gscraper Perl 12 08-27-04 03:06 AM
submit form with more than one href submit and no submit button adlinfanus JavaScript 1 03-09-04 06:45 AM
submit form? tcooper PHP 5 12-12-03 03:30 PM
question on form and submit TxRanger JavaScript 2 11-03-03 11:28 AM
Preventing email form abuse LunarOrbit Perl 3 10-04-03 09:55 PM


All times are GMT -5. The time now is 04:12 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.