CDONTS组件使用事例
yoken
阅读:1380
2007-10-15 01:40:00
评论:0
option explicit
dim strSQL
dim strDescription
dim strXingHao
dim strMeno
dim strLengQue
dim strWaiXing
dim strName
dim strDuty
dim strEmail
dim strCompany
dim strAddress
dim strTelephone
dim strFax
dim objMail
strName = Request.Form("txtName")
strDuty = Request.Form("txtDuty")
strEmail = Request.Form("txtEmail")
strCompany = Request.Form("txtCompany")
strAddress = Request.Form("txtAddress")
strTelephone = Request.Form("txtTelephone")
strFax = Request.Form("txtFax")
strXingHao = Request.Form("txtXingHao")
strMeno = Request.Form("txtMeno")
strName = realStr(strName)
strDuty = realStr(strDuty)
strEmail = realStr(strEmail)
strCompany = realStr(strCompany)
strAddress = realStr(strAddress)
strTelephone = realStr(strTelephone)
strFax = realStr(strFax)
strXingHao = realStr(strXingHao)
strMeno = realStr(strMeno)
if strName="" or strEmail="" or strCompany="" or strTelephone="" then
response.write "姓名、邮箱、公司名、电话均不能为空!"
response.end
end if
strDescription="abcdefg" & vbcrlf
if strName<>"" then strDescription = strDescription & "姓 名:" & strName & vbcrlf
if strDuty<>"" then strDescription = strDescription & "现任职务:" & strDuty & vbcrlf
if strEmail<>"" then strDescription = strDescription & "电子邮箱:" & strEmail & vbcrlf
if strCompany<>"" then strDescription = strDescription & "公司名称:" & strCompany & vbcrlf
if strAddress<>"" then strDescription = strDesctiption & "联系地址:" & strAddress & vbcrlf
if strTelephone<>"" then strDescription = strDescription & "联系电话:" & strTelephone & vbcrlf
if strFax<>"" then strDescription = strDescription & "传 真:" & strFax
if strXingHao<>"" then strDescription = strDescription & "现使用产品型号:" & strXingHao & vbcrlf
if strMeno<>"" then strDescription = strDescription & "对产品的意见、建议及需求:" & strMeno
strDescription = replace(strDescription,"abcdefg" & vbcrlf,"")
strDescription = trim(strDescription)
Set objMail = Server.CreateObject("CDONTS.NEWMAIL")
objMail.From = "market@dctec.com.cn"
objMail.To = "market@dctec.com.cn"
objMail.Subject = "网站技术支持来信"
objMail.Body = strDescription
objMail.Send
Set objMail = Nothing
function realStr(strSource)
realStr = replace(strSource,"''","")
realStr = trim(realStr)
realStr = replace(realStr,"script","")
end function
%>
<script language="javascript">
alert("您的信息已经发送成功,非常感谢您对我公司的支持!");
window.location.href="/";
</script>
<HTML>
<HEAD>
<TITLE>深圳市东辰科技有限公司</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
</BODY>
</HTML>
转载保留链接!网址:https://80920140.com/post/53.html
声明
1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源; 2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任; 3.作者投稿可能会经我们编辑修改或补充。
发表评论