WEB开发网
开发学院WEB开发ASP ASP开发WAP简易邮件系统实例(续) 阅读

ASP开发WAP简易邮件系统实例(续)

 2007-07-19 12:04:23 来源:WEB开发网   
核心提示: 〈% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %〉〈%Response.ContentType = "text/vnd.wap.wml; charset=UTF-8"%〉〈?xml versio
  〈% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %〉
  〈%Response.ContentType = "text/vnd.wap.wml; charset=UTF-8"%〉
  〈?xml version="1.0" encoding="utf-8"?〉
  〈!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"〉
  〈wml〉
  〈card id="main" title="查看邮件"〉
  〈p〉
  〈%
  user=request("user")
  pwd=request("pwd")
  id=request("id")
  page=request("page")
  Set pop3 = Server.CreateObject( "JMail.POP3" )
  ' POP3的连接用户名,密码,POP3地址
  pop3.connect user,pwd,"http://pop3.sohu.com"
  Set msg = pop3.Messages.item(id)
  ReTo = ""
  ReCC = ""
  Set Recipients = msg.Recipients
  separator = ", "
  For i = 0 To Recipients.Count - 1
  If i = Recipients.Count - 1 Then
  separator = ""
  End If
  Set re = Recipients.item(i)
  If re.ReType = 0 Then
  ReTo = ReTo & re.Name & re.EMail & separator
  else
  ReCC = ReTo & re.Name & re.EMail & separator
  End If
  Next
  body=msg.body
  body=replace(body,"〈","")
  body=replace(body,"〉","")
  Set Attachments = msg.Attachments
  %〉
  〈a href="email_title.asp?user=〈%=user%〉&pwd=〈%=pwd%〉&page=〈%=page%〉"〉返回上一页〈/a〉 〈a href="reply.asp?user=〈%=user%〉&pwd=〈%=pwd%〉&mailto=〈%=msg.From%〉"〉回复〈/a〉 〈a href="email_del.asp?user=〈%=user%〉&pwd=〈%=pwd%〉&id=〈%=id%〉"〉删除〈/a〉
  〈/p〉
  〈p〉
  发件人:〈%= msg.FromName %〉--〈%=msg.date%〉〈br/〉
  标题:〈%= msg.Subject %〉〈br/〉
  内容:〈%= body %〉〈br/〉
  〈%
  if Attachments.Count〉0 then
  response.Write("信件中包含附件,请通过网络查收!")
  end if
  pop3.Disconnect
  %〉
  〈/p〉
  〈p〉
  〈a href="email_list.asp?user=〈%=user%〉&pwd=〈%=pwd%〉&page=〈%=page%〉"〉返回上一页〈/a〉 〈a href="reply.asp?user=〈%=user%〉&pwd=〈%=pwd%〉&mailto=〈%=msg.From%〉"〉回复〈/a〉 〈a href="email_del.asp?user=〈%=user%〉&pwd=〈%=pwd%〉&id=〈%=id%〉"〉删除〈/a〉
  〈/p〉
  〈/card〉
  〈/wml〉

5) 删除邮件

上一页  1 2 3 4 5 6  下一页

Tags:ASP 开发 WAP

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接