forsyth20121205-174063a80cc13 years agoHistory
80 lines · 2.0 KB · Text
RawDownload
.TH POP3 2.SH NAMEpop3 \- Post Office Protocol.SH SYNOPSIS.EXinclude "pop3.m";pop3 := load Pop3 Pop3->PATH; open:       fn(user, password, server: string): (int, string);stat:       fn(): (int, string, int, int);msglist:    fn(): (int, string, list of (int, int));msgnolist:  fn(): (int, string, list of int);top:        fn(m: int): (int, string, string);get:        fn(m: int): (int, string, string);delete:     fn(m: int): (int, string);close:      fn(): (int, string);.EE.SH DESCRIPTION.B Pop3provides an interface to the Post Office ProtocolPOP3 through a set of functions..PP.B Openopens a connection to a POP3.IR server ,logging in as the specified.IR userwith the given.IR password .If.I serveris.IR nil ,.B openuses.BR $pop3 ,which must be defined in.IR ndb (6).The remaining functions assume a successfully opened connection..PP.B Statreturns the status of the user's mailbox.The third element of its return tuple is the number ofmessages and the fourth is the total number of bytes in the messages..PP.B Msglistlists the user's mailbox. The third element in its return tuple gives a list of pairs of numberscomprising.RI ( "message number, bytes in message" )..PP.B Msgnolistlists the user's mailbox as above but omits the bytes in each message..PP.B Topreturns the top of message.IR m ..PP.B Getreturns the full text of message.IR m ..PP.B Deletedeletes message.IR m ..PP.B Closecloses the connection to the POP3 server.Note that subsequent reconnections to the servermay renumber the messages in the mail box and will certainly do so if the last connectiondeleted messages..PPNote also that a connection is static in the sense that mail messages entering the server during a connection will not be accessible. A reconnection is needed to see newly arrived messages..SH SOURCE.B /appl/lib/pop3.b.SH SEE ALSO.IR acme (1).SH DIAGNOSTICSAll these functions return -1and an error message on failure as the first two entries in their return tuples.