所属类别:Asp
文章作者:佚名
特别推荐:免费发布信息 承包关键词~~抢爆了!HOT!
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.<% Response.ContentType = "text/vnd.wap.wml" %><?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"><!-- THIS IS THE FIRST CARD IN THE DECK -->Your FeedbackPlease enter your email address Please enter your feedback Back 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.<% Response.ContentType = "text/vnd.wap.wml" %><?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">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, sstrToaddrMailer.Subject = "SUBJECT OF FEEDBACK EMAIL"Mailer.BodyText = Request.Form("txtMessage")If Mailer.SendMail Then Response.Write "Mail has been sent..."elseResponse.Write "Mail send failure. Error was " & Mailer.Response &""end if %>Back to MenuNow 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").关闭本页
相关信息· 游戏的基础结构。
· 如何才能让MySQL与OpenOffice共舞
· 开源还是不开,共产主义吗?
· Windows XP 安装 IP v6协议的方法
70265
325
