不能重定向?!在线等!!

weiqihp weiqihp 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<%@ Language=VBScript %>
<% Response.Expires = 0 %>
<% Response.Buffer = true %>
<!-- #INCLUDE FILE = "../share/Connectdb.asp" -->
<!-- #INCLUDE FILE = "../share/pubfun_mail.asp" -->
<!-- #INCLUDE FILE = "../share/pubfunction.asp" -->

<%
dim strType,objFs
Set objFs = Server.CreateObject("Scripting.FileSystemObject")
'strType = request("type") '操作类型:delall表示删除,否则表示接收
dim strTimeOut,strCount '接收超时参数和一次接收邮件数参数
strTimeOut = 300
strCount = Request("yjcount")
if strTime = "" or not IsNumeric(strTime) then strTime = 90
if strCount = "" or not IsNumeric(strCount) then strCount = ""
Server.ScriptTimeout = strTimeOut '设定邮件接收最长时间

on error resume next
dim strygbh,strSql,mailRs,strPOP3bh,currPOP3bh,i,objPOP3,sCount,currPOP3,strMessage,ii,Msg
strygbh = Session("uYGBH")
strPOP3bh = request("delyjjmc")
Set mailRs = Server.CreateObject("ADODB.RecordSet")
Set objPOP3 = Server.CreateObject( "LKOAMAILCom.clsAspMailCom" )
strMessage = ""
'取出POP3 SERVER编号,进行多个POP3邮件收取

strSql = "select * from oa_mail_pop3 where rybh=" & strygbh
mailRs.Open strSql,conn,1,1
do while not mailRs.EOF
sCount = 0
currPOP3 = split(mailrs("POP3"),":")

Response.Write "<br>接收<b>" & server.HTMLEncode(mailrs("pop3mc")&"") & "</b>的邮件...<br>"
Response.Flush
with objPOP3.poSendMail
.UseSMTPAuthentication = false
.UsePopAuthentication = true
.POP3Host = currPOP3(0)
.POP3Port = currPOP3(1)
.Username = mailRs("pop3yhm")
.Password = Decrypt(mailRs("pop3dlmm"),false)
'.IsOnlyTotalMail = false
'if UCase(strType) = "DELALL" then .IsOnlyDelMail = true
.IsDelMail = cbool(mailrs("scbz")&"")
'response.end
.Send


If clng(.Mails.Count) > 0 and not.IsOnlyDelMail then
For ii = 1 to .Mails.Count
'response.Write "MSG::::" & .Mails(ii) & "<p>"
Lkoa_SaveEmail .Mails(ii),mailRs("jsyjj"),ii '调用存储外部邮件函数
Next

strMessage = "在 <B>" & mailRs("pop3mc") & "</B> 上收取了<font clor=blue> " _
& .Mails.Count & "</font> 封邮件!邮件存储在您的<b>" _
& "<a href=mail_list.asp?yjjmc=" & mailRs("jsyjj") & ">" _
& server.HTMLEncode(mailRs("jsyjj")) & "</a></b><br>"
Response.Write strMessage

DO WHILE .Mails.Count>0
Mails.Remove(1)
LOOP
End If

End With
mailRs.MoveNext
Loop



objPOP3.Disconnect
Set objPOP3 = Nothing
mailRs.Close
conn.Close
Set conn = Nothing
Set objFs = Nothing
Response.Redirect "mail_list.asp?yjjmc=收件夹" '就是这儿,居然不能重定向!
%>

<%

'存储外部邮件函数
Function Lkoa_SaveEmail(emailObject,emailYjjmc,iiii)
dim funSql,funRs,myFile,strTime,strmbPath,strAtth,iAtth,strYjxh,fileAtth
dim funjjrxm,funjjrdz,funsjrdz,funcs,funrq,funzhuti,funzwljwj,funyjjmc,funtsbz,funydbz,funyjbz,funyxjb,funyjdx,funfjlj
dim objMime
Set funRs = Server.CreateObject("ADODB.RecordSet")
set objMime = Server.CreateObject("LKOAMIMEMail.CMIMEMail")
objMime.Receive emailObject
funjjrxm = replace(replace(objMime.From,"'","''"),chr(0),"")
funjjrdz = replace(replace(objMime.ReplyTo,"'","''"),chr(0),"")
funsjrdz = replace(replace(objMime.MessageTo,"'","''"),chr(0),"")
funcs = replace(replace(objMime.BCC,"'","''"),chr(0),"")
funrq = objMime.SendDate
IF not isdate(funrq) then
funrq = replace(funrq,"+","")
if not isdate(funrq) then
funrq = ""
else
funrq = formatdate(funrq,"YYYYMMDDHHMMSS","-")
end if
ELSE
funrq = formatdate(funrq,"YYYYMMDDHHMMSS","-")
end if
'Response.Write "tIME ZONE:" & funrq
funzhuti = replace(replace(objMime.Subject,"'","''"),chr(0),"")

'定义存储邮件的物理路径
strTime="LKMAIL_W" & getMaxMailID
strmbPath = getMailFolder(PubMail_webSjj,Session("uYGBH"),true)
Set myFile = objFs.CreateTextFile(strmbPath & strTime & ".eml",true)
myFile.Write emailObject '写入邮件原始内容到文件
myFile.Close
Set myFile = Nothing
'EncryptFile strmbPath & strTime & ".lkml" '文件加密
'Response.Write strmbPath & strTime & ".lkml"
funzwljwj = strTime & ".eml"

funyjjmc = replace(emailYjjmc,"'","''")
funtsbz = ""
funydbz = ""
funyjbz = "0"
funyxjb = "3"
if len(objMime.Priority & "")=1 then
funyxjb = objMime.Priority
end if

'取邮件大小
Set myFile = objFs.GetFile(strmbPath & strTime & ".eml")
funyjdx = myFile.size
Set myFile = Nothing
'funzhuti = left(funzhuti,len(funzhuti)-1)
'Response.Write "主题:" & asc(right(funzhuti,1)) & "<p>"
'将邮件对应信息存储到数据库
funSql = "insert into oa_mail_yj (ygbh,jjrxm,jjrdz,sjrdz,cs,rq,zhuti,zwljwj,yjjmc,tsbz,ydbz,yjbz,yxjb,yjdx) " _
& " values (" & Session("uYGBH") & ",'" & funjjrxm & "','" & funjjrdz & "','" & funsjrdz& "','" & funcs & "','" & funrq & "','" & cstr(funzhuti) & "','" &funzwljwj & "','" _
& funyjjmc & "','" & funtsbz & "','" & funydbz & "','" & funyjbz & "','" & funyxjb & "', " & funyjdx & ")"
'Response.Write server.HTMLEncode(funSql) & "<br>"
conn.Execute funSql

'1、取该邮件的序号,用于附件数据存储时关联
stryjxh = 0
funSql = "select max(yjxh) from oa_mail_yj where ygbh=" & Session("uYGBH") & " and zwljwj='" & funzwljwj & "'"
funRs.Open funSql,conn,adOpenStatic
if not funRs.EOF then
if funrs(0) & "" <> "" then
strYjxh = clng(funRs(0))
end if
end if
funRs.Close
Set funRs = Nothing

'存储邮件对应附件
if objMime.AttachmentCount > 0 then


'2、取出该邮件的附件信息,相应存储到文件和数据库中去
''Set strAtth = objMime.a

For iAtth = 1 To objMime.AttachmentCount
''Set fileAtth = strAtth(iAtth)

strTime = "MAIL" & strYjxh & "_FJ" & iAtth & stryxbh


'调用自己的函数来取附件并存储附件
objMime.RetriveAttachments getMailFolder(PubMail_Temp,Session("uYGBH"),true), iAtth

'fileAtth.SaveToFile getMailFolder(PubMail_Temp,Session("uYGBH"),true) & fileAtth.Name '存储附件到临时目录
funfjlj = strTime & "." & objFs.GetExtensionName(getMailFolder(PubMail_Temp,Session("uYGBH"),false) & objMime.AttachName)

'copy临时目录的附件文件,改名存储在附件目录
objFs.CopyFile getMailFolder(PubMail_Temp,Session("uYGBH"),false) & objMime.AttachName, _
getMailFolder(PubMail_Fj,Session("uYGBH"),true) & funfjlj

objFs.DeleteFile getMailFolder(PubMail_Temp,Session("uYGBH"),false) & objMime.AttachName,True '删除临时目录中的附件文件
'Response.Write fileAtth.Name & ":" & getMailFolder(PubMail_FJ,Session("uYGBH"),true) & strTime & "." & fileAtth.Name & "<br>"

'向数据库写入相应信息
funSql = "insert into oa_mail_fj (yjxh,fjmc,fjlj,fjbz) values ('" & strYjxh _
& "','" & objMime.AttachName & "','" & funfjlj & "','1')"
conn.Execute funSql

Next
end if
Set objMime = Nothing
'Response.Write emailObject.Text & "<p><p>" & emailObject.Body & "<p><p>" & emailObject.BodyText
End Function

%>
...全文

相关推荐

图像处理软件(1) 几款打包 必下!!!绝对实用!!网上工具很多都不能用!!这几款功能强大!!极力推荐!!因为只能上传15M以内的文件 所以分几次!有的大文件不能上传!请谅解!

图像处理软件 几款打包 必下!!!绝对实用!!网上工具很多都不能用!!这几款功能强大!!极力推荐!!因为只能上传图像处理软件 几款打包 必下!!!绝对实用!!网上工具很多都不能用!!这几款功能强大!!极力推荐!!因为只能上传15M以内的文件 所以分几次15M以内的文件 所以分几次

Sam·

js中!和!!的区别与用法

js中!的用法是比较灵活的,它除了做逻辑运算常常会用!做类型判断,可以用!与上对象来求得一个布尔值, 1、!可将变量转换成boolean类型,null、undefined和空字符串取反都为false,其余都为true。 !null=true !undefined=true !''=true !100=false !'abc'=false 2、!!常常用来做类型判断,在第一步!(变量)之后再做逻辑取反运算,在js中新手常常会写这样臃肿的代码: 判断变量a为非空,未定义或者非空串才能执行方法体的内容 var a; if(a!=null&&typeof(a)!=undefined&&a!='')

weixin_38619613

guesswhat:你猜怎么着?! 基线

你猜怎么着?! 楷模 这个 repo 旨在重现 GuessWhat? 系列的结果? 论文,即: 你猜怎么着?! 通过多模态对话发现视觉对象 [1] 目标驱动和视觉基础对话系统的端到端优化 [2] - 该代码由 Florian Strub(里尔大学)和 Harm de Vries(蒙特利尔大学)同样开发 该项目是 CHISTERA - IGLU 项目的一部分。 您还可以使用分支 refacto_v2 访问具有更多基线的更高级的代码库: : 警告:重构原始论文的代码后,我们修复了代码库中的一个错误(在某些情况下,最后生成的问题被忽略了)。 新分数大大高于 [1] 中报告的分数,但一些结果分析现在已经过时(qgen 停止学习停止,贪婪具有最高的准确性)。 我们对不便表示抱歉。 概括: 火车猜测者 火车Qgen 常问问题 引文 介绍 我们介绍 GuessWhat?!,这是一个两人

泰国旅行

Feeling Meh ?!-crx插件

让我们摆脱生活中的“感觉Me” 您可以在无聊时快速执行的随机任务列表,您需要一些帮助您退后一步以告诉您该怎么做。 语言:English

weixin_38514805

ICMP重定向介绍,ICMP重定向介绍

ICMP重定向介绍ICMP重定向介绍ICMP重定向介绍

隔壁老
评论 6
收藏 已收藏
分享
返回顶部
weiqihp
ASP 28,401 成员 356,940 内容