Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "Net::POP3 3" | |
132 | .TH Net::POP3 3 "2002-06-01" "perl v5.8.0" "Perl Programmers Reference Guide" | |
133 | .SH "NAME" | |
134 | Net::POP3 \- Post Office Protocol 3 Client class (RFC1939) | |
135 | .SH "SYNOPSIS" | |
136 | .IX Header "SYNOPSIS" | |
137 | .Vb 1 | |
138 | \& use Net::POP3; | |
139 | .Ve | |
140 | .PP | |
141 | .Vb 3 | |
142 | \& # Constructors | |
143 | \& $pop = Net::POP3->new('pop3host'); | |
144 | \& $pop = Net::POP3->new('pop3host', Timeout => 60); | |
145 | .Ve | |
146 | .SH "DESCRIPTION" | |
147 | .IX Header "DESCRIPTION" | |
148 | This module implements a client interface to the \s-1POP3\s0 protocol, enabling | |
149 | a perl5 application to talk to \s-1POP3\s0 servers. This documentation assumes | |
150 | that you are familiar with the \s-1POP3\s0 protocol described in \s-1RFC1939\s0. | |
151 | .PP | |
152 | A new Net::POP3 object must be created with the \fInew\fR method. Once | |
153 | this has been done, all \s-1POP3\s0 commands are accessed via method calls | |
154 | on the object. | |
155 | .SH "EXAMPLES" | |
156 | .IX Header "EXAMPLES" | |
157 | .Vb 1 | |
158 | \& Need some small examples in here :-) | |
159 | .Ve | |
160 | .SH "CONSTRUCTOR" | |
161 | .IX Header "CONSTRUCTOR" | |
162 | .IP "new ( [ \s-1HOST\s0, ] [ \s-1OPTIONS\s0 ] )" 4 | |
163 | .IX Item "new ( [ HOST, ] [ OPTIONS ] )" | |
164 | This is the constructor for a new Net::POP3 object. \f(CW\*(C`HOST\*(C'\fR is the | |
165 | name of the remote host to which a \s-1POP3\s0 connection is required. | |
166 | .Sp | |
167 | If \f(CW\*(C`HOST\*(C'\fR is not given, then the \f(CW\*(C`POP3_Host\*(C'\fR specified in \f(CW\*(C`Net::Config\*(C'\fR | |
168 | will be used. | |
169 | .Sp | |
170 | \&\f(CW\*(C`OPTIONS\*(C'\fR are passed in a hash like fashion, using key and value pairs. | |
171 | Possible options are: | |
172 | .Sp | |
173 | \&\fBResvPort\fR \- If given then the socket for the \f(CW\*(C`Net::POP3\*(C'\fR object | |
174 | will be bound to the local port given using \f(CW\*(C`bind\*(C'\fR when the socket is | |
175 | created. | |
176 | .Sp | |
177 | \&\fBTimeout\fR \- Maximum time, in seconds, to wait for a response from the | |
178 | \&\s-1POP3\s0 server (default: 120) | |
179 | .Sp | |
180 | \&\fBDebug\fR \- Enable debugging information | |
181 | .SH "METHODS" | |
182 | .IX Header "METHODS" | |
183 | Unless otherwise stated all methods return either a \fItrue\fR or \fIfalse\fR | |
184 | value, with \fItrue\fR meaning that the operation was a success. When a method | |
185 | states that it returns a value, failure will be returned as \fIundef\fR or an | |
186 | empty list. | |
187 | .IP "user ( \s-1USER\s0 )" 4 | |
188 | .IX Item "user ( USER )" | |
189 | Send the \s-1USER\s0 command. | |
190 | .IP "pass ( \s-1PASS\s0 )" 4 | |
191 | .IX Item "pass ( PASS )" | |
192 | Send the \s-1PASS\s0 command. Returns the number of messages in the mailbox. | |
193 | .IP "login ( [ \s-1USER\s0 [, \s-1PASS\s0 ]] )" 4 | |
194 | .IX Item "login ( [ USER [, PASS ]] )" | |
195 | Send both the \s-1USER\s0 and \s-1PASS\s0 commands. If \f(CW\*(C`PASS\*(C'\fR is not given the | |
196 | \&\f(CW\*(C`Net::POP3\*(C'\fR uses \f(CW\*(C`Net::Netrc\*(C'\fR to lookup the password using the host | |
197 | and username. If the username is not specified then the current user name | |
198 | will be used. | |
199 | .Sp | |
200 | Returns the number of messages in the mailbox. However if there are no | |
201 | messages on the server the string \f(CW"0E0"\fR will be returned. This is | |
202 | will give a true value in a boolean context, but zero in a numeric context. | |
203 | .Sp | |
204 | If there was an error authenticating the user then \fIundef\fR will be returned. | |
205 | .IP "apop ( [ \s-1USER\s0 [, \s-1PASS\s0 ]] )" 4 | |
206 | .IX Item "apop ( [ USER [, PASS ]] )" | |
207 | Authenticate with the server identifying as \f(CW\*(C`USER\*(C'\fR with password \f(CW\*(C`PASS\*(C'\fR. | |
208 | Similar to \*(L"login\*(R", but the password is not sent in clear text. | |
209 | .Sp | |
210 | To use this method you must have the Digest::MD5 or the \s-1MD5\s0 module installed, | |
211 | otherwise this method will return \fIundef\fR. | |
212 | .IP "top ( \s-1MSGNUM\s0 [, \s-1NUMLINES\s0 ] )" 4 | |
213 | .IX Item "top ( MSGNUM [, NUMLINES ] )" | |
214 | Get the header and the first \f(CW\*(C`NUMLINES\*(C'\fR of the body for the message | |
215 | \&\f(CW\*(C`MSGNUM\*(C'\fR. Returns a reference to an array which contains the lines of text | |
216 | read from the server. | |
217 | .IP "list ( [ \s-1MSGNUM\s0 ] )" 4 | |
218 | .IX Item "list ( [ MSGNUM ] )" | |
219 | If called with an argument the \f(CW\*(C`list\*(C'\fR returns the size of the message | |
220 | in octets. | |
221 | .Sp | |
222 | If called without arguments a reference to a hash is returned. The | |
223 | keys will be the \f(CW\*(C`MSGNUM\*(C'\fR's of all undeleted messages and the values will | |
224 | be their size in octets. | |
225 | .IP "get ( \s-1MSGNUM\s0 [, \s-1FH\s0 ] )" 4 | |
226 | .IX Item "get ( MSGNUM [, FH ] )" | |
227 | Get the message \f(CW\*(C`MSGNUM\*(C'\fR from the remote mailbox. If \f(CW\*(C`FH\*(C'\fR is not given | |
228 | then get returns a reference to an array which contains the lines of | |
229 | text read from the server. If \f(CW\*(C`FH\*(C'\fR is given then the lines returned | |
230 | from the server are printed to the filehandle \f(CW\*(C`FH\*(C'\fR. | |
231 | .IP "getfh ( \s-1MSGNUM\s0 )" 4 | |
232 | .IX Item "getfh ( MSGNUM )" | |
233 | As per \fIget()\fR, but returns a tied filehandle. Reading from this | |
234 | filehandle returns the requested message. The filehandle will return | |
235 | \&\s-1EOF\s0 at the end of the message and should not be reused. | |
236 | .IP "last ()" 4 | |
237 | .IX Item "last ()" | |
238 | Returns the highest \f(CW\*(C`MSGNUM\*(C'\fR of all the messages accessed. | |
239 | .IP "popstat ()" 4 | |
240 | .IX Item "popstat ()" | |
241 | Returns a list of two elements. These are the number of undeleted | |
242 | elements and the size of the mbox in octets. | |
243 | .IP "ping ( \s-1USER\s0 )" 4 | |
244 | .IX Item "ping ( USER )" | |
245 | Returns a list of two elements. These are the number of new messages | |
246 | and the total number of messages for \f(CW\*(C`USER\*(C'\fR. | |
247 | .IP "uidl ( [ \s-1MSGNUM\s0 ] )" 4 | |
248 | .IX Item "uidl ( [ MSGNUM ] )" | |
249 | Returns a unique identifier for \f(CW\*(C`MSGNUM\*(C'\fR if given. If \f(CW\*(C`MSGNUM\*(C'\fR is not | |
250 | given \f(CW\*(C`uidl\*(C'\fR returns a reference to a hash where the keys are the | |
251 | message numbers and the values are the unique identifiers. | |
252 | .IP "delete ( \s-1MSGNUM\s0 )" 4 | |
253 | .IX Item "delete ( MSGNUM )" | |
254 | Mark message \f(CW\*(C`MSGNUM\*(C'\fR to be deleted from the remote mailbox. All messages | |
255 | that are marked to be deleted will be removed from the remote mailbox | |
256 | when the server connection closed. | |
257 | .IP "reset ()" 4 | |
258 | .IX Item "reset ()" | |
259 | Reset the status of the remote \s-1POP3\s0 server. This includes reseting the | |
260 | status of all messages to not be deleted. | |
261 | .IP "quit ()" 4 | |
262 | .IX Item "quit ()" | |
263 | Quit and close the connection to the remote \s-1POP3\s0 server. Any messages marked | |
264 | as deleted will be deleted from the remote mailbox. | |
265 | .SH "NOTES" | |
266 | .IX Header "NOTES" | |
267 | If a \f(CW\*(C`Net::POP3\*(C'\fR object goes out of scope before \f(CW\*(C`quit\*(C'\fR method is called | |
268 | then the \f(CW\*(C`reset\*(C'\fR method will called before the connection is closed. This | |
269 | means that any messages marked to be deleted will not be. | |
270 | .SH "SEE ALSO" | |
271 | .IX Header "SEE ALSO" | |
272 | Net::Netrc, | |
273 | Net::Cmd | |
274 | .SH "AUTHOR" | |
275 | .IX Header "AUTHOR" | |
276 | Graham Barr <gbarr@pobox.com> | |
277 | .SH "COPYRIGHT" | |
278 | .IX Header "COPYRIGHT" | |
279 | Copyright (c) 1995\-1997 Graham Barr. All rights reserved. | |
280 | This program is free software; you can redistribute it and/or modify | |
281 | it under the same terms as Perl itself. | |
282 | .PP | |
283 | \&\fI$Id: //depot/libnet/Net/POP3.pm#22 $\fR |