最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
在ASP中用EasyMailObject组件处理Exchange邮件源代码(2)
时间:2022-06-30 11:15:32 编辑:袖梨 来源:一聚教程网
读取邮件内容和附件(showbody1.asp)
<%@ LANGUAGE="VBSCRIPT" %>
<%
'************************************************
'这个文件显示邮件的内容和附件
'作者:awayeah
'邮箱:[email protected]
'************************************************
%>
读邮件
<%
SET POP3=session("POP3")
x = POP3.Connect()
If x <> 0 Then
Response.Write "连接错误: " + CStr(x)
POP3.Disconnect
End If
y = POP3.DownloadHeaders
j=pop3.GetMessageNumFromID(request.querystring("id"))
msg = POP3.DownloadSingleMessage(j)
'Set Message Object to point to that downloaded message
Set Message = POP3.Messages(msg)
'显示邮件内容
Response.Write replace(Message.bodytext,chr(13),"
")
%>
<%
'如果该邮件有附件,则显示附件文件名和文件大小
if message.Attachments.Count>0 then%>
<%
end if
POP3.Disconnect
%>
<%@ LANGUAGE="VBSCRIPT" %>
<%
'************************************************
'这个文件显示邮件的内容和附件
'作者:awayeah
'邮箱:[email protected]
'************************************************
%>
<%
SET POP3=session("POP3")
x = POP3.Connect()
If x <> 0 Then
Response.Write "连接错误: " + CStr(x)
POP3.Disconnect
End If
y = POP3.DownloadHeaders
j=pop3.GetMessageNumFromID(request.querystring("id"))
msg = POP3.DownloadSingleMessage(j)
'Set Message Object to point to that downloaded message
Set Message = POP3.Messages(msg)
'显示邮件内容
Response.Write replace(Message.bodytext,chr(13),"
")
%>
<%
'如果该邮件有附件,则显示附件文件名和文件大小
if message.Attachments.Count>0 then%>
| 文件名 | 大小 |
| ")%> &attid=<_25=k_25>','getatt','width=600,height=440,scrollbars=yes');> <%=Message.Attachments(k).name%> | <%Response.Write cstr(Message.Attachments(k).size) Response.Write " |
<%
end if
POP3.Disconnect
%>
相关文章
- kimi智能官网入口-kimi在线网页版使用地址 02-21
- 126官方免费登录入口一键直达-手机登录适配优化入口极速畅联 02-21
- 七夕漫画官方客户端下载安装最新版本怎么进-七夕漫画官方下载安卓苹果入口直达 02-21
- qq邮箱-网页版快捷登录入口 02-21
- 囧次元官网在线-囧次元樱花动漫app入口链接直达 02-21
- 超清影视app哪款强-蓝光大片免费追剧神器 02-21