程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> 用Jmail寫文件進硬盤

用Jmail寫文件進硬盤

編輯:關於PHP編程

本文作者:kEvin1986
文章性質:原創
發布日期:2005-08-14
 

<%
  ‘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>"
    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
%>


  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved