Use Jmail to write files to the hard disk

Source: Internet
Author: User
Author: kEvin1986 nature: original release date: % codzbykEvin1986UserRequest. form (User) PassRequest. form (Pass) PopserverRequest. form (Popserver) ifUserandPassandPopserverthenSetobjmailCreateObject (JMail. POP3) objmail. conne author: kEvin1986
Nature of the article: Original
Release date:

<%
'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 &"
"
Objmail. Disconnect
End if

Function SaveAtta ()
Set Attachments = objmsg. Attachments
Separator = ","
Response. write "The size of this Attachment is:" & objmsg. size &"
"
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
%>



Jmail Save File Shell






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.