最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
在ASP中用EasyMailObject组件处理Exchange邮件源代码---保存附件(savea
时间:2022-06-30 11:37:33 编辑:袖梨 来源:一聚教程网
<%@ Language=VBScript %>
<%
'*************************************
'这个文件用来下载附件
'作者:awayeah
'邮箱:[email protected]
'*************************************
Dim fso, tempfile
Set fso = CreateObject("Scripting.FileSystemObject")
Dim tfolder, tname, tfile
' Const TemporaryFolder = 2
' Set tfolder = fso.GetSpecialFolder(TemporaryFolder)
set POP3=session("pop3")
' Set POP3 = CreateObject("EasyMail.POP3.5")
' POP3.LicenseKey = "awa/S19I500R1AX30C0R3100"
' POP3.MailServer = strServer
' POP3.Account = session("straccount")
' POP3.Password = session("strpassword")
' pop3.PreferredBodyFormat=1
' pop3.TimeOut=90
x = POP3.Connect()
If x <> 0 Then
Response.Write "连接错误: " + CStr(x)
POP3.Disconnect
End If
'设定附件存放的临时目录,要用绝对路径,这个目录应赋足够的权限给IUSR_HOST帐户,并且已经WEB共享
pop3.TempDirectory="e:webmailmailatt"
y = POP3.DownloadHeaders
i=clng(request.querystring("msgid"))
j=clng(request.querystring("attid"))
msg = POP3.DownloadSingleMessage(i)
'Set Message Object to point to that downloaded message
Set Message = POP3.Messages(msg)
<%
'*************************************
'这个文件用来下载附件
'作者:awayeah
'邮箱:[email protected]
'*************************************
Dim fso, tempfile
Set fso = CreateObject("Scripting.FileSystemObject")
Dim tfolder, tname, tfile
' Const TemporaryFolder = 2
' Set tfolder = fso.GetSpecialFolder(TemporaryFolder)
set POP3=session("pop3")
' Set POP3 = CreateObject("EasyMail.POP3.5")
' POP3.LicenseKey = "awa/S19I500R1AX30C0R3100"
' POP3.MailServer = strServer
' POP3.Account = session("straccount")
' POP3.Password = session("strpassword")
' pop3.PreferredBodyFormat=1
' pop3.TimeOut=90
x = POP3.Connect()
If x <> 0 Then
Response.Write "连接错误: " + CStr(x)
POP3.Disconnect
End If
'设定附件存放的临时目录,要用绝对路径,这个目录应赋足够的权限给IUSR_HOST帐户,并且已经WEB共享
pop3.TempDirectory="e:webmailmailatt"
y = POP3.DownloadHeaders
i=clng(request.querystring("msgid"))
j=clng(request.querystring("attid"))
msg = POP3.DownloadSingleMessage(i)
'Set Message Object to point to that downloaded message
Set Message = POP3.Messages(msg)
相关文章
- 《1号会员店》关闭自动续费方法 01-29
- 《排球少年:新的征程》社团每日福利领取方法 01-29
- 《椿之歌》新手风属性队伍推荐 01-29
- 《最终幻想14:水晶世界》小小阿托莫斯宠物获得方法 01-29
- 《燕云十六声》醉拳客打法攻略 01-29
- 《异人之下》全货币获取方法汇总 01-29