Joke Collection Website - Blessing messages - (300 points) Seek an easy language receiving source code.

(300 points) Seek an easy language receiving source code.

Version 2

Support library pop3

. Assembly start-up assembly

. Assembly variable mail, mail information, "0"

. Assembly variable attachment, attachment information, "0"

. Assembly variable mail index, integer type

. Attachment index of assembly variable, integer.

. Total number of assembly variable messages of integer type.

. Number of Attachments for Integer Assembly Variables

. Assembly variable login information, text type, "6"

Whether assembly variables can be browsed quickly, logical types.

. Assembly variable message size, integer, "0"

. Assembly variable mail sequence number group, text type,' 0'

. Subroutine _ startup subroutine, integer, and execute this subroutine first after the program is started.

Standard Output ("Test of Mail Receiving Support Library" +# newline)

Standard output (,"Email login:"+# line break ")

Register the receive callback function. Callback function)

Set proxy ()

Landing ()

Quick browse ()

Standard output ("Quick Browse Complete"+# line break)

Standard output (,"Do you need to look at each email in detail? (Yes/No) ")

. If true (code (standard input (), 1) = 12 1)

Read e-mail ()

If it's over.

Standard Input ()

Return (0)' can return any value as needed.

. Subroutine setting agent

. Whether local variables and text types are set.

. Local variable server type, text type

. Local variable server address, text type.

. Local variable server port, text type

. Local variable server user, text type

. Local variable server password, text type.

Standard output ("Do you want to set proxy server (Y/N)"+# line break)

Set = standard input ()

. If it is true (take the code (whether it is set, 1) = 12 1).

Standard output (,"1: http 1. 1 proxy, 2: socks 5 proxy-")

Server Type = Standard Input ()

Standard output (,"Proxy server IP address-")

Server address = standard input ()

Standard output (,"port number-")

Server Port = Standard Input ()

Standard Output (,"User Name-")

Server User = Standard Input ()

Standard Output (,"Password-")

Server password = standard input ()

If (set proxy server (integer (server type), server address, numerical value (server port), server user, server password) = true)

Standard output ("Setting proxy server succeeded"+# line break)

Otherwise.

Standard output ("Unable to set proxy server")

Standard Input ()

End ()

If it's over

If it's over.

. Subroutine login

Local variable text variable, text type

Standard output ("Please enter mail server address:")

Text variable = standard input (true)

Login information [1] = text variable

Standard output (,"Please enter the port number:")

Text variable = standard input (true)

Login information [2] = text variable

Standard output ("Please enter user name:")

Text variable = standard input (true)

Login information [3] = text variable

Standard output (,"Please enter password:")

Text variable = standard input (true)

Login information [4] = text variable

Standard output (,"Please enter wait time (ms):")

Text variable = standard input (true)

Login information [5] = text variable

Standard output ("Please enter the number of retries:")

Text variable = standard input (true)

Login information [6] = text variable

Standard Output (,# newline)

Connect to the mail server ()

The subroutine connects to the mail server.

Standard output (,"Please wait for .......... when logging in to the mail server")

Standard output (,# newline+# newline)

. If it is true (connect the receiving server (login information [1], to numerical value (login information [2]), login information [3], login information [4], to numerical value (login information [5]), to numerical value (login information [6])= false).

Standard output (,"Error occurred:"+Get email error message ())

Standard Input ()

End ()

If it's over.

Standard output ("Mailbox connection successful")

Read e-mail ()

. Read e-mail subroutine

. Logical return of local variables, logical type

. Local variable total mail, integer type.

. Local variable browsing, text type.

. Local variable mail serial number, text type.

. Local variable with degree, integer type.

Logical return = get email information (total number of emails, total number of emails)

If true (logical return = false)

Standard output (,"Error in getting email information:"+Error in getting email information ())

Standard Input ()

End ()

If it's over.

Standard output (,"Total number of messages:"+text (total number of messages)+# line break)

Standard output (,"number of messages:"+text (total number of messages)+# line break)

Redefine the array (mail, fake mail, total mail)

Clear Array (Message Size)

Logical return = Get message size (-1, message size, total number of messages)

If true (logical return = false)

Standard output (,"Error in getting the size of each email:"+error message ())

Standard Input ()

End ()

If it's over.

Standard output ("Do you want to browse quickly (Y/N)")

Browse = Standard Input (True)

Standard Output (,# newline)

Standard output (,"Please wait for ............ to receive mail")

If (code (browse, 1) = 12 1)

Whether to browse quickly = true.

. Count cycle header (total number of messages, count variable)

Mail[ count variable] = the first few lines of the received mail (count variable, 10)

. Count cycle tail ()

Otherwise.

. Count cycle header (total number of messages, count variable)

Mail [Count Variable] = Received Mail (Count Variable)

. Count cycle tail ()

If it's over

Standard output (,# newline)

Standard output (,# newline)

Clear array (mail sequence number group)

. Count cycle header (total number of messages, count variable)

Received mail sequence number (counting variable, mail sequence number)

Join member (mail serial number group, mail serial number)

. Count cycle tail ()

Standard Output ("Mail Received")

Disconnect the receiving server ()

If true (whether to browse quickly = false)

Mail information ()

If it's over.

. Subroutine mail information

. Local variable mail sequence number, integer type

Standard output (,* * * received mail "+text (total mail)+"pieces "+# line break)

Standard output ("Please enter the secondary serial number of the message to view the message content:" ")

Mail Auxiliary Serial Number = End Value (standard input (true))

. If (email serial number ≥ 1 and email serial number ≤ total number of emails)

Pick up mail (mail subsequence number)

Otherwise.

Mail information ()

If it's over

. The subroutine obtains attachment information.

. Index number of parameter attachment, integer type

Whether local variables are embedded and logical.

. Local variable file name, text type

. Local variable file number, integer type.

Standard Output (,# newline)

Standard output ("number")+text (attachment index number)+"attachment information"+# line break)

Standard output (,"embedded or not embedded:")

Embedded = Attachment [Attachment Index Number]. Whether to embed attachment () is selected.

Standard output (,to text (embedded or not))

Standard Output (,# newline)

. If (embedded or not = true)

Standard output (,"Embedded file name:")

Standard output (,attachment [attachment index number]. Take a name ())

Otherwise.

Standard output (,"Append file name:")

Standard output (,attachment [attachment index number]. Take the file name ())

If it's over

Standard Output (,# newline)

Standard output (,"Attachment size:")

Standard output (,to text (attachment [attachment index number]). Size()))

Standard Output (,# newline)

Standard Output (,"Attachment Type:")

Standard output (,attachment [attachment index number]. Take type())

Standard Output (,# newline)

Standard output (,"encoding method:")

Standard output (,attachment [attachment index number]. Take the encoding method ())

Standard Output (,# newline)

Standard output (,"Size of attachment data:")

Standard output (,to text (take byte set length (attachment [attachment index number]). Get data ()))

Standard Output (,# newline)

. A subroutine for getting mail.

Parameter mail index number, integer type

. Local variable content, text type

. Local variable with degree, integer type.

Standard output (,"number"+text (number of mail indexes)+"mail message"+# line break)

Standard output (,"Sender's name:")

Standard output (,mail[ mail index]. Get the sender's name ())

Standard Output (,# newline)

Standard output (,"Subject:")

Standard output (,mail[ number of mail indexes]. With title ())

Standard Output (,# newline)

Standard Output (,"Date:")

Standard output (,to text (mail [mail index number]). Shooting date ())

Standard Output (,# newline)

Standard Output (,"Sender Address:")

Standard output (,mail[ mail index number]. Get the sender's address ())

Standard Output (,# newline)

Standard output (,"Return address:")

Standard output (,mail[ number of mail indexes]. Take the reply address ())

Standard Output (,# newline)

Standard output (,"Message size:")

Standard output (,to text (message size [number of message indexes])

Standard output (,# newline)

Standard Output (,"Mail Serial Number:")

Standard output (,mail sequence number group [number of mail indexes])

Standard output (,# newline)

Standard output ("original message length:")

Standard output (,converted to text (take the length of text (mail[ mail index number])). Get the original data ())

Standard Output (,# newline)

Standard output (,"Text content:")

Content = mail[ number of mail indexes]. Get Text Content ()

Standard output (,content+# newline)

Standard Output ("Save Hypertext File")

Hypertext content (number of mail indexes)

Standard Output (,# newline)

Standard Output (,"Attachment Quantity:")

Number of attachments = number of messages [message index]. Take the number of attachments ()

Standard output (,to text (number of attachments))

Standard Output (,# newline)

If true (whether to browse quickly = false)

Standard Output (,# newline)

Attachment = mail [number of mail indexes]. Get attachment ()

. Count loop head (take the number of array members (attachment) and count variables)

Get attachment information (count variable)

. Count cycle tail ()

Select to save attachments (number of mail indexes)

Standard Output (,# newline)

Mail information ()

If it's over.

. The subroutine chooses to save the attachment.

Parameter selection attachment index, integer type

. Attachment serial number of local variable, integer type.

Standard output ("Do I need to save the attachment (Yes/No)")

If (code (standard input (), 1) = 12 1)

Standard output ("Please enter the serial number of the attachment to be saved:" ")

Attachment secondary serial number = end value (standard input (true))

. If true (attachment serial number ≥ 1 and attachment serial number ≤ attachment quantity)

Save the attachment (attachment secondary serial number)

If it's over.

Otherwise.

Delete subroutine (select attachment index)

If it's over

Subroutine deletion subroutine

. Parameter index

. Whether to delete local variables and text types.

Standard output ("Do you want to delete this message (Y/N)")

Delete = standard input (true)

. If it is true (take the code (delete or not, 1) = 12 1)

Connect the receiving server (login information [1], to numerical value (login information [2]), login information [3], login information [4], to numerical value (login information [5]), to numerical value (login information [6]).

If (delete message (index) = true)

Standard Output ("Delete Successfully")

Otherwise.

Standard Output ("Delete Failed")

If it's over

If it's over.

Mail reset ()

. Subroutine quick browse

. Local variable with degree, integer type.

. Count loop head (take the number of array members (mail) and count variables)

Get Mail (Count Variable)

Delete subroutine (count variable)

Standard output (,# newline)

. Count cycle tail ()

. Subroutines save attachments.

Parameter saves index, integer type.

. Local variable file name, text type

. Local variable file number, integer type.

. If (attachment [save index]. Whether to embed attachment () = true)

File Name = Attachment [Save Index]. Take a name ()

Otherwise.

File Name = Attachment [Save Index]. Take the file name ()

If it's over

Standard output ("Please enter the saving path ending with"+# quotation mark+"\"+# quotation mark+":"))

File number = open file (standard input (true)+file name, # rewrite,)

If (insert byte set (file number, attachment [save index]). fetch data ()) = true)

Standard output ("saved successfully")

Otherwise.

Standard Output ("Save Failed")

If it's over

Close file (file number)

Standard output (,# newline)

. Subroutine mail reset

Standard output (,# newline)

Standard output (,"Do you need to recover deleted messages? (Yes/No) ")

. If true (code (standard input (),) = 12 1)

. If (reset mail () = true)

Standard Output ("Reset Successful")

Standard Output ("Deleted Messages Recovered")

Otherwise.

Standard Output ("Reset Failed")

If it's over

If it's over.

. Subroutine hypertext content

Parameter index, integer type

. Local variable with degree, integer type.

. Local variable file number, integer type.

. Local variable temporary file, text type.

Standard output ("Please enter the path to browse the hypertext document temporarily, ending with"+# quotation marks+"\"+# quotation marks+":").

Temporary file = standard input ()

File number = open file (temporary file+"temporary browsing. Html ",# rewrite,)" creates a web page file with hypertext content for browsing.

Insert text (document number, e-mail [index]). Get hypertext content ())

Close file (file number)

. Count cycle head (e-mail [index]). Take the number of attachments (), count variables)

. If true (attachment [counting variables]. Do you want to embed attachment ()

File number = open file (temporary file+attachment [counting variable]). Take name (), # rewrite,)' to create the attachment file of the hypertext web page to be browsed.

Insert byte set (file number, attachment [count variable]). Get data ())

Close file (file number)

If it's over.

. Count cycle tail ()

. Subroutine callback function, logical type

. Parameter type, integer type

Parameter number, integer type

. Parameter bytes, integer type

Judge start (# command type. Authentication User Name = Type)

Standard Output ("Verify User Information")

. default

The trial is over

Return (true)