博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在WAP网站上建立反馈表单(转)
阅读量:2495 次
发布时间:2019-05-11

本文共 2425 字,大约阅读时间需要 8 分钟。

For any one person to create a web site and then think it is perfect, is ridiculous. It is important to

allow the visitors of our web sites to comment on what we have developed so that we can learn from the end-
user, our mistakes and not to mention the overall effectiveness. We create these facilities for web sites
so why not create them for our WAP sites.
A feedback form is developed by first creating the form, in this case to capture the end-user's comments,
and second to create the SendMail code, which will be used to send the comments via e-mail to us. As
always if you have any other problems with ASP/WML then you can e-mail me at michael_wright@lineone.net.
Also if you are a company supervisor, manager or director I am always looking for work, whether it be
working remotely or on-location. Please feel free to e-mail the same address.
First we create the feedback form itself. Please remember to change the red capital letters within the
code.
<?xml version="1.0"?>
<!-- THIS IS THE FIRST CARD IN THE DECK --&gt

Your Feedback

Please enter your email address

Please enter your feedback

value="$txtFrom"/>

Now save that code as a file called feedback.asp. Then we must create the SendMail code. This SendMail
code can only be used if you have the ASPMail component installed on your web server. It is possible to
simply change the ASP code in conjunction with your own component e.g. CDONTS.[page]
<?xml version="1.0"?>

Your Feedback

sstrToName = "YOUR NAME"
sstrToAddr = "YOUR EMAIL ADDRESS"
Set Mailer = CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "SMTP MAIL SERVER"
Mailer.FromAddress = Request.Form("txtFrom")
Mailer.AddRecipient sstrToName, sstrToaddr
Mailer.Subject = "SUBJECT OF FEEDBACK EMAIL"
Mailer.BodyText = Request.Form("txtMessage")
If Mailer.SendMail Then
Response.Write "

Mail has been sent...

"
else
Response.Write "

Mail send failure. Error was " & Mailer.Response &"

"
end if
%>

Now save that code as a file called email.asp and you are ready to test it. I hope you found this article
helpful. One of the main problems I had when creating this code was the way in which the WAP input is
recognised by the ASP code i.e. You must either use Request.Form("txtFrom") or Request.QueryString
("txtFrom") and not just Request("txtForm").
以下内容为程序代码:

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10294527/viewspace-125337/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10294527/viewspace-125337/

你可能感兴趣的文章
linux 下安装JDK
查看>>
简单的ASP.NET无刷新分页
查看>>
宏定义学习
查看>>
omitting directory `folder/'
查看>>
JavaScript面试题
查看>>
TCollector
查看>>
我的博客网站开发6——博文关键字搜索
查看>>
vim7.1在windows下的编码设置[转]
查看>>
同步器之Exchanger
查看>>
IO流
查看>>
专家观点:即使在云中 硬件同样至关重要
查看>>
loadrunner11录制不成功解决方法(收集)
查看>>
jQuery 基础
查看>>
USE平台构件属性无法显示的一种解决办法
查看>>
Cannot open include file: jni.h: No such file or directory解决方法
查看>>
HDU-水饺基情 二维树状数组
查看>>
visual studio 安装Entity framework失败
查看>>
测试对bug如何分析和定位
查看>>
c/c++学习书籍
查看>>
python应用-爬取猫眼电影top100
查看>>