查看: 1127|回复: 4
|
关于制作register form/ contact form 的难题
[复制链接]
|
|
恩。。。想请教各位一个问题。。。首先我就做了一个contact form但send不出。
我是用2个file run我的form( contact.htm和send-form.asp),一个就是html page让人填form, summit后就会run 这个send-form.asp。
问题是当我click summit button后,就show这个:

我的asp file是这样的。。。。
<%
If Not Request.Form("CheckMe") = ("Web") Then
Response.write "NO SPAMMERS"
Else
Dim objMailer 'As String
Dim sch 'As String
Dim strBody 'As String
Dim bSendOK 'As Boolean
Dim msg 'As String
Const cdoMailFormatMime = 0
Const cdoMailFormatText = 1
Const cdoBodyFormatHTML = 0
Const cdoBodyFormatText = 1
strBody = strBody & "========================================================" & vbCrLf
strBody = strBody & " Online Feedback Form [http://www.xxxxxxxx.com]" & vbCrLf
strBody = strBody & "========================================================" & vbCrLf
strBody = strBody & "Date: " & Date & vbCrLf
strBody = strBody & "" & vbCrLf
strBody = strBody & "" & vbCrLf
strBody = strBody & "Name : " & Request("Name") & vbCrLf
strBody = strBody & "Address : " & Request("Address") & vbCrLf
strBody = strBody & "Organization : " & Request("Organization") & vbCrLf
strBody = strBody & "Phone No. : " & Request("PhoneNo") & vbCrLf
strBody = strBody & "E-mail : " & Request("Email") & vbCrLf
strBody = strBody & "Message : " & Request("Message") & vbCrLf
strBody = strBody & "" & vbCrLf
strBody = strBody & "" & vbCrLf
'strBody = strBody & "How you found our web site?" & vbCrLf
'strBody = strBody & "========================================================" & vbCrLf
'strBody = strBody & "Found from : " & Request("survey") & vbCrLf
'strBody = strBody & "Others : " & Request("search_engines") & vbCrLf
'strBody = strBody & "" & vbCrLf
'strBody = strBody & "" & vbCrLf
strBody = strBody & "========================================================" & vbCrLf
strBody = strBody & "* This e-mail was sent from http://www.xxxxxxs.com"
Set objMailer = Server.CreateObject("Persits.MailSender")
'If SMTP authentication is required
objMailer.Host = "mail.XXXnet.my"
objMailer.Username = "XX@XXX.net.my"
objMailer.Password = "XXX"
objMailer.FromName = Request.Form("Name")
objMailer.From = Request.Form("Email")
objMailer.AddAddress "XX@XX.com.my", "Client Services"
objMailer.AddBcc "onlineforms@XX.net.my", "Online Forms"
objMailer.Subject = "Online Feedback from www.XXXXX.com"
objMailer.Body = strBody
strReturnUrl = Request.ServerVariables("HTTP_REFERER")
' Now send it off!
On Error Resume Next
If objMailer.Send Then
End If
If Err.Number = 0 then
bSendOK = True
msg = "Your email is being sent. Pls wait..."
' After send off where do you want to redirect page!
Response.write msg
Else
msg = "Bad Mail"
Response.write msg
End If
Set objMailer = Nothing
End If
%>
<script language="JavaScript">
<!--
var rtn='<%= strReturnUrl %>';
var err_msg='<%= strErrMsg %>';
alert('Your feedback form has been submitted. Thank you.');
if(rtn!=''){
if(err_msg!='') alert(err_msg);
document.location.href=rtn;
}else{
document.location.href='index.htm';
}
//-->
</script>
问题会不会是在highlight字眼哪里呢?。。。。那一段我不是很明白。。。
[ 本帖最后由 SR20 于 21-4-2006 05:45 PM 编辑 ] |
|
|
|
|
|
|
|
发表于 21-4-2006 07:09 PM
|
显示全部楼层
|
|
|
|
|
|
|

楼主 |
发表于 26-4-2006 08:45 PM
|
显示全部楼层
原帖由 milktin 于 21-4-2006 07:09 PM 发表
apache 应该不能用 ASP 吧!!!
paisei...什么是apache...?  |
|
|
|
|
|
|
|
发表于 26-4-2006 10:25 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 26-4-2006 10:36 PM
|
显示全部楼层
|
|
|
|
|
|
| |
本周最热论坛帖子
|