Codebase list libmail-box-pop3-perl / 25235e0
New upstream snapshot. Debian Janitor 2 years ago
22 changed file(s) with 448 addition(s) and 2503 deletion(s). Raw diff Collapse all Expand all
00
11 ===== history of distribution Mail-Box-POP3
2
3 version 3.006:
24
35 version 3.005: Fri 3 May 09:41:53 CEST 2019
46
00 ChangeLog
11 MANIFEST
22 Makefile.PL
3 README
43 README.md
54 lib/Mail/Box/POP3.pm
6 lib/Mail/Box/POP3.pod
75 lib/Mail/Box/POP3/Message.pm
8 lib/Mail/Box/POP3/Message.pod
96 lib/Mail/Box/POP3/Test.pm
107 lib/Mail/Box/POP3s.pm
11 lib/Mail/Box/POP3s.pod
128 lib/Mail/Transport/POP3.pm
13 lib/Mail/Transport/POP3.pod
149 t/01basic.t
1510 t/02break.t
1611 t/03minimal.t
33 "Mark Overmeer"
44 ],
55 "dynamic_config" : 1,
6 "generated_by" : "ExtUtils::MakeMaker version 7.3, CPAN::Meta::Converter version 2.150010",
6 "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010",
77 "license" : [
88 "perl_5"
99 ],
6060 "web" : "https://github.com/markov2/perl5-Mail-Box-POP3"
6161 }
6262 },
63 "version" : "3.005",
64 "x_serialization_backend" : "JSON::PP version 2.94"
63 "version" : "3.006",
64 "x_serialization_backend" : "JSON::PP version 4.04"
6565 }
66 configure_requires:
77 ExtUtils::MakeMaker: '0'
88 dynamic_config: 1
9 generated_by: 'ExtUtils::MakeMaker version 7.3, CPAN::Meta::Converter version 2.150010'
9 generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010'
1010 license: perl
1111 meta-spec:
1212 url: http://module-build.sourceforge.net/META-spec-v1.4.html
3535 homepage: http://perl.overmeer.net/CPAN/
3636 license: http://dev.perl.org/licenses/
3737 repository: https://github.com/markov2/perl5-Mail-Box-POP3.git
38 version: '3.005'
39 x_serialization_backend: 'CPAN::Meta::YAML version 0.011'
38 version: '3.006'
39 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
33
44 use IO::Handle;
55
6 my $VERSION = '3.005';
6 my $VERSION = '3.006';
77
88 my %prereq =
99 ( Carp => 0
+0
-25
README less more
0 === README for Mail-Box-POP3 version 3.005
1 = Generated on Wed May 1 12:41:28 2019 by OODoc 2.02
2
3 There are various ways to install this module:
4
5 (1) if you have a command-line, you can do:
6 perl -MCPAN -e 'install <any package from this distribution>'
7
8 (2) if you use Windows, have a look at http://ppm.activestate.com/
9
10 (3) if you have downloaded this module manually (as root/administrator)
11 gzip -d Mail-Box-POP3-3.005.tar.gz
12 tar -xf Mail-Box-POP3-3.005.tar
13 cd Mail-Box-POP3-3.005
14 perl Makefile.PL
15 make # optional
16 make test # optional
17 make install
18
19 For usage, see the included manual-pages or
20 http://search.cpan.org/dist/Mail-Box-POP3-3.005/
21
22 Please report problems to
23 http://rt.cpan.org/Dist/Display.html?Queue=Mail-Box-POP3
24
0 libmail-box-pop3-perl (3.005-2) UNRELEASED; urgency=medium
0 libmail-box-pop3-perl (3.005+git20190503.1.97fdaf2-1) UNRELEASED; urgency=medium
11
22 [ gregor herrmann ]
33 * debian/watch: use uscan version 4.
1010 * Remove obsolete field Name from debian/upstream/metadata (already present in
1111 machine-readable debian/copyright).
1212 * Update standards version to 4.5.0, no changes needed.
13 * New upstream snapshot.
1314
14 -- gregor herrmann <gregoa@debian.org> Sat, 22 Feb 2020 16:41:12 +0100
15 -- gregor herrmann <gregoa@debian.org> Mon, 02 Aug 2021 08:15:19 -0000
1516
1617 libmail-box-pop3-perl (3.005-1) unstable; urgency=medium
1718
0 # Copyrights 2001-2019 by [Mark Overmeer].
1 # For other contributors see ChangeLog.
2 # See the manual pages for details on the licensing terms.
3 # Pod stripped from pm file by OODoc 2.02.
40 # This code is part of distribution Mail-Box-POP3. Meta-POD processed with
51 # OODoc into POD and HTML manual-pages. See README.md
62 # Copyright Mark Overmeer. Licensed under the same terms as Perl itself.
73
84 package Mail::Box::POP3::Message;
9 use vars '$VERSION';
10 $VERSION = '3.005';
11
125 use base 'Mail::Box::Net::Message';
136
147 use strict;
158 use warnings;
169
10 =chapter NAME
11
12 Mail::Box::POP3::Message - one message on a POP3 server
13
14 =chapter SYNOPSIS
15
16 my $folder = new Mail::Box::POP3 ...
17 my $message = $folder->message(10);
18
19 =chapter DESCRIPTION
20
21 A C<Mail::Box::POP3::Message> represents one message on a POP3 server,
22 maintained by a M<Mail::Box::POP3> folder. Each message is stored as
23 separate entity on the server, and maybe temporarily in your program
24 as well.
25
26 =chapter METHODS
27
28 =c_method new %options
29
30 =default body_type M<Mail::Message::Body::Lines>
31
32 =cut
1733
1834 sub init($)
1935 { my ($self, $args) = @_;
2440 $self;
2541 }
2642
43 =method size
44 Returns the size of this message. If the message is still on the remote
45 server, POP is used to ask for the size. When the message is already loaded
46 onto the local system, the size of the parsed message is taken. These
47 sizes can differ because the difference in line-ending representation.
48 =cut
2749
2850 sub size($)
2951 { my $self = shift;
5880
5981 #-------------------------------------------
6082
83 =section Internals
84 =cut
6185
6286 sub loadHead()
6387 { my $self = shift;
+0
-631
lib/Mail/Box/POP3/Message.pod less more
0 =encoding utf8
1
2 =head1 NAME
3
4 Mail::Box::POP3::Message - one message on a POP3 server
5
6 =head1 INHERITANCE
7
8 Mail::Box::POP3::Message
9 is a Mail::Box::Net::Message
10 is a Mail::Box::Message
11 is a Mail::Message
12 is a Mail::Reporter
13
14 =head1 SYNOPSIS
15
16 my $folder = new Mail::Box::POP3 ...
17 my $message = $folder->message(10);
18
19 =head1 DESCRIPTION
20
21 A C<Mail::Box::POP3::Message> represents one message on a POP3 server,
22 maintained by a L<Mail::Box::POP3|Mail::Box::POP3> folder. Each message is stored as
23 separate entity on the server, and maybe temporarily in your program
24 as well.
25
26 Extends L<"DESCRIPTION" in Mail::Box::Net::Message|Mail::Box::Net::Message/"DESCRIPTION">.
27
28 =head1 METHODS
29
30 Extends L<"METHODS" in Mail::Box::Net::Message|Mail::Box::Net::Message/"METHODS">.
31
32 =head2 Constructors
33
34 Extends L<"Constructors" in Mail::Box::Net::Message|Mail::Box::Net::Message/"Constructors">.
35
36 =over 4
37
38 =item $obj-E<gt>B<clone>(%options)
39
40 Inherited, see L<Mail::Message/"Constructors">
41
42 =item Mail::Box::POP3::Message-E<gt>B<new>(%options)
43
44 -Option --Defined in --Default
45 body Mail::Message undef
46 body_type Mail::Box::Message Mail::Message::Body::Lines
47 deleted Mail::Message <false>
48 field_type Mail::Message undef
49 folder Mail::Box::Message <required>
50 head Mail::Message undef
51 head_type Mail::Message Mail::Message::Head::Complete
52 labels Mail::Message {}
53 log Mail::Reporter 'WARNINGS'
54 messageId Mail::Message undef
55 modified Mail::Message <false>
56 size Mail::Box::Message undef
57 trace Mail::Reporter 'WARNINGS'
58 trusted Mail::Message <false>
59 unique Mail::Box::Net::Message <unique string>
60
61 =over 2
62
63 =item body => OBJECT
64
65 =item body_type => CODE|CLASS
66
67 =item deleted => BOOLEAN
68
69 =item field_type => CLASS
70
71 =item folder => FOLDER
72
73 =item head => OBJECT
74
75 =item head_type => CLASS
76
77 =item labels => ARRAY|HASH
78
79 =item log => LEVEL
80
81 =item messageId => STRING
82
83 =item modified => BOOLEAN
84
85 =item size => INTEGER
86
87 =item trace => LEVEL
88
89 =item trusted => BOOLEAN
90
91 =item unique => STRING
92
93 =back
94
95 =back
96
97 =head2 Constructing a message
98
99 Extends L<"Constructing a message" in Mail::Box::Net::Message|Mail::Box::Net::Message/"Constructing a message">.
100
101 =over 4
102
103 =item $obj-E<gt>B<bounce>( [<$rg_object|%options>] )
104
105 Inherited, see L<Mail::Message::Construct::Bounce/"Constructing a message">
106
107 =item Mail::Box::POP3::Message-E<gt>B<build>( [$message|$part|$body], $content )
108
109 Inherited, see L<Mail::Message::Construct::Build/"Constructing a message">
110
111 =item Mail::Box::POP3::Message-E<gt>B<buildFromBody>($body, [$head], $headers)
112
113 Inherited, see L<Mail::Message::Construct::Build/"Constructing a message">
114
115 =item $obj-E<gt>B<forward>(%options)
116
117 Inherited, see L<Mail::Message::Construct::Forward/"Constructing a message">
118
119 =item $obj-E<gt>B<forwardAttach>(%options)
120
121 Inherited, see L<Mail::Message::Construct::Forward/"Constructing a message">
122
123 =item $obj-E<gt>B<forwardEncapsulate>(%options)
124
125 Inherited, see L<Mail::Message::Construct::Forward/"Constructing a message">
126
127 =item $obj-E<gt>B<forwardInline>(%options)
128
129 Inherited, see L<Mail::Message::Construct::Forward/"Constructing a message">
130
131 =item $obj-E<gt>B<forwardNo>(%options)
132
133 Inherited, see L<Mail::Message::Construct::Forward/"Constructing a message">
134
135 =item $obj-E<gt>B<forwardPostlude>()
136
137 Inherited, see L<Mail::Message::Construct::Forward/"Constructing a message">
138
139 =item $obj-E<gt>B<forwardPrelude>()
140
141 Inherited, see L<Mail::Message::Construct::Forward/"Constructing a message">
142
143 =item $obj-E<gt>B<forwardSubject>(STRING)
144
145 Inherited, see L<Mail::Message::Construct::Forward/"Constructing a message">
146
147 =item Mail::Box::POP3::Message-E<gt>B<read>($fh|STRING|SCALAR|ARRAY, %options)
148
149 Inherited, see L<Mail::Message::Construct::Read/"Constructing a message">
150
151 =item $obj-E<gt>B<rebuild>(%options)
152
153 Inherited, see L<Mail::Message::Construct::Rebuild/"Constructing a message">
154
155 =item $obj-E<gt>B<reply>(%options)
156
157 Inherited, see L<Mail::Message::Construct::Reply/"Constructing a message">
158
159 =item $obj-E<gt>B<replyPrelude>( [STRING|$field|$address|ARRAY-$of-$things] )
160
161 Inherited, see L<Mail::Message::Construct::Reply/"Constructing a message">
162
163 =item $obj-E<gt>B<replySubject>(STRING)
164
165 =item Mail::Box::POP3::Message-E<gt>B<replySubject>(STRING)
166
167 Inherited, see L<Mail::Message::Construct::Reply/"Constructing a message">
168
169 =back
170
171 =head2 The message
172
173 Extends L<"The message" in Mail::Box::Net::Message|Mail::Box::Net::Message/"The message">.
174
175 =over 4
176
177 =item $obj-E<gt>B<container>()
178
179 Inherited, see L<Mail::Message/"The message">
180
181 =item $obj-E<gt>B<copyTo>($folder, %options)
182
183 Inherited, see L<Mail::Box::Message/"The message">
184
185 =item $obj-E<gt>B<folder>( [$folder] )
186
187 Inherited, see L<Mail::Box::Message/"The message">
188
189 =item $obj-E<gt>B<isDummy>()
190
191 Inherited, see L<Mail::Message/"The message">
192
193 =item $obj-E<gt>B<isPart>()
194
195 Inherited, see L<Mail::Message/"The message">
196
197 =item $obj-E<gt>B<messageId>()
198
199 Inherited, see L<Mail::Message/"The message">
200
201 =item $obj-E<gt>B<moveTo>($folder, %options)
202
203 Inherited, see L<Mail::Box::Message/"The message">
204
205 =item $obj-E<gt>B<partNumber>()
206
207 Inherited, see L<Mail::Message/"The message">
208
209 =item $obj-E<gt>B<print>( [$fh] )
210
211 Inherited, see L<Mail::Message/"The message">
212
213 =item $obj-E<gt>B<send>( [$mailer], %options )
214
215 Inherited, see L<Mail::Message/"The message">
216
217 =item $obj-E<gt>B<seqnr>( [$integer] )
218
219 Inherited, see L<Mail::Box::Message/"The message">
220
221 =item $obj-E<gt>B<size>()
222
223 Returns the size of this message. If the message is still on the remote
224 server, POP is used to ask for the size. When the message is already loaded
225 onto the local system, the size of the parsed message is taken. These
226 sizes can differ because the difference in line-ending representation.
227
228 =item $obj-E<gt>B<toplevel>()
229
230 Inherited, see L<Mail::Message/"The message">
231
232 =item $obj-E<gt>B<unique>( [STRING|undef] )
233
234 Inherited, see L<Mail::Box::Net::Message/"The message">
235
236 =item $obj-E<gt>B<write>( [$fh] )
237
238 Inherited, see L<Mail::Message/"The message">
239
240 =back
241
242 =head2 The header
243
244 Extends L<"The header" in Mail::Box::Net::Message|Mail::Box::Net::Message/"The header">.
245
246 =over 4
247
248 =item $obj-E<gt>B<bcc>()
249
250 Inherited, see L<Mail::Message/"The header">
251
252 =item $obj-E<gt>B<cc>()
253
254 Inherited, see L<Mail::Message/"The header">
255
256 =item $obj-E<gt>B<date>()
257
258 Inherited, see L<Mail::Message/"The header">
259
260 =item $obj-E<gt>B<destinations>()
261
262 Inherited, see L<Mail::Message/"The header">
263
264 =item $obj-E<gt>B<from>()
265
266 Inherited, see L<Mail::Message/"The header">
267
268 =item $obj-E<gt>B<get>($fieldname)
269
270 Inherited, see L<Mail::Message/"The header">
271
272 =item $obj-E<gt>B<guessTimestamp>()
273
274 Inherited, see L<Mail::Message/"The header">
275
276 =item $obj-E<gt>B<head>( [$head] )
277
278 Inherited, see L<Mail::Message/"The header">
279
280 =item $obj-E<gt>B<nrLines>()
281
282 Inherited, see L<Mail::Message/"The header">
283
284 =item $obj-E<gt>B<sender>()
285
286 Inherited, see L<Mail::Message/"The header">
287
288 =item $obj-E<gt>B<study>($fieldname)
289
290 Inherited, see L<Mail::Message/"The header">
291
292 =item $obj-E<gt>B<subject>()
293
294 Inherited, see L<Mail::Message/"The header">
295
296 =item $obj-E<gt>B<timestamp>()
297
298 Inherited, see L<Mail::Message/"The header">
299
300 =item $obj-E<gt>B<to>()
301
302 Inherited, see L<Mail::Message/"The header">
303
304 =back
305
306 =head2 The body
307
308 Extends L<"The body" in Mail::Box::Net::Message|Mail::Box::Net::Message/"The body">.
309
310 =over 4
311
312 =item $obj-E<gt>B<body>( [$body] )
313
314 Inherited, see L<Mail::Message/"The body">
315
316 =item $obj-E<gt>B<contentType>()
317
318 Inherited, see L<Mail::Message/"The body">
319
320 =item $obj-E<gt>B<decoded>(%options)
321
322 Inherited, see L<Mail::Message/"The body">
323
324 =item $obj-E<gt>B<encode>(%options)
325
326 Inherited, see L<Mail::Message/"The body">
327
328 =item $obj-E<gt>B<isMultipart>()
329
330 Inherited, see L<Mail::Message/"The body">
331
332 =item $obj-E<gt>B<isNested>()
333
334 Inherited, see L<Mail::Message/"The body">
335
336 =item $obj-E<gt>B<parts>( [<'ALL'|'ACTIVE'|'DELETED'|'RECURSE'|$filter>] )
337
338 Inherited, see L<Mail::Message/"The body">
339
340 =back
341
342 =head2 Flags
343
344 Extends L<"Flags" in Mail::Box::Net::Message|Mail::Box::Net::Message/"Flags">.
345
346 =over 4
347
348 =item $obj-E<gt>B<delete>()
349
350 Inherited, see L<Mail::Message/"Flags">
351
352 =item $obj-E<gt>B<deleted>( [BOOLEAN] )
353
354 Inherited, see L<Mail::Message/"Flags">
355
356 =item $obj-E<gt>B<isDeleted>()
357
358 Inherited, see L<Mail::Message/"Flags">
359
360 =item $obj-E<gt>B<isModified>()
361
362 Inherited, see L<Mail::Message/"Flags">
363
364 =item $obj-E<gt>B<label>($label|PAIRS)
365
366 Inherited, see L<Mail::Message/"Flags">
367
368 =item $obj-E<gt>B<labels>()
369
370 Inherited, see L<Mail::Message/"Flags">
371
372 =item $obj-E<gt>B<labelsToStatus>()
373
374 Inherited, see L<Mail::Message/"Flags">
375
376 =item $obj-E<gt>B<modified>( [BOOLEAN] )
377
378 Inherited, see L<Mail::Message/"Flags">
379
380 =item $obj-E<gt>B<statusToLabels>()
381
382 Inherited, see L<Mail::Message/"Flags">
383
384 =back
385
386 =head2 The whole message as text
387
388 Extends L<"The whole message as text" in Mail::Box::Net::Message|Mail::Box::Net::Message/"The whole message as text">.
389
390 =over 4
391
392 =item $obj-E<gt>B<file>()
393
394 Inherited, see L<Mail::Message::Construct::Text/"The whole message as text">
395
396 =item $obj-E<gt>B<lines>()
397
398 Inherited, see L<Mail::Message::Construct::Text/"The whole message as text">
399
400 =item $obj-E<gt>B<printStructure>( [$fh|undef],[$indent] )
401
402 Inherited, see L<Mail::Message::Construct::Text/"The whole message as text">
403
404 =item $obj-E<gt>B<string>()
405
406 Inherited, see L<Mail::Message::Construct::Text/"The whole message as text">
407
408 =back
409
410 =head2 Internals
411
412 Extends L<"Internals" in Mail::Box::Net::Message|Mail::Box::Net::Message/"Internals">.
413
414 =over 4
415
416 =item $obj-E<gt>B<clonedFrom>()
417
418 Inherited, see L<Mail::Message/"Internals">
419
420 =item Mail::Box::POP3::Message-E<gt>B<coerce>($message, %options)
421
422 Inherited, see L<Mail::Message/"Internals">
423
424 =item $obj-E<gt>B<diskDelete>()
425
426 Inherited, see L<Mail::Box::Message/"Internals">
427
428 =item $obj-E<gt>B<isDelayed>()
429
430 Inherited, see L<Mail::Message/"Internals">
431
432 =item $obj-E<gt>B<loadBody>()
433
434 Inherited, see L<Mail::Box::Net::Message/"Internals">
435
436 =item $obj-E<gt>B<readBody>( $parser, $head, [$bodytype] )
437
438 Inherited, see L<Mail::Box::Message/"Internals">
439
440 =item $obj-E<gt>B<readFromParser>( $parser, [$bodytype] )
441
442 Inherited, see L<Mail::Message/"Internals">
443
444 =item $obj-E<gt>B<readHead>( $parser, [$class] )
445
446 Inherited, see L<Mail::Message/"Internals">
447
448 =item $obj-E<gt>B<recursiveRebuildPart>($part, %options)
449
450 Inherited, see L<Mail::Message::Construct::Rebuild/"Internals">
451
452 =item $obj-E<gt>B<storeBody>($body)
453
454 Inherited, see L<Mail::Message/"Internals">
455
456 =item $obj-E<gt>B<takeMessageId>( [STRING] )
457
458 Inherited, see L<Mail::Message/"Internals">
459
460 =back
461
462 =head2 Error handling
463
464 Extends L<"Error handling" in Mail::Box::Net::Message|Mail::Box::Net::Message/"Error handling">.
465
466 =over 4
467
468 =item $obj-E<gt>B<AUTOLOAD>()
469
470 Inherited, see L<Mail::Message::Construct/"METHODS">
471
472 =item $obj-E<gt>B<addReport>($object)
473
474 Inherited, see L<Mail::Reporter/"Error handling">
475
476 =item $obj-E<gt>B<defaultTrace>( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
477
478 =item Mail::Box::POP3::Message-E<gt>B<defaultTrace>( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
479
480 Inherited, see L<Mail::Reporter/"Error handling">
481
482 =item $obj-E<gt>B<errors>()
483
484 Inherited, see L<Mail::Reporter/"Error handling">
485
486 =item $obj-E<gt>B<log>( [$level, [$strings]] )
487
488 =item Mail::Box::POP3::Message-E<gt>B<log>( [$level, [$strings]] )
489
490 Inherited, see L<Mail::Reporter/"Error handling">
491
492 =item $obj-E<gt>B<logPriority>($level)
493
494 =item Mail::Box::POP3::Message-E<gt>B<logPriority>($level)
495
496 Inherited, see L<Mail::Reporter/"Error handling">
497
498 =item $obj-E<gt>B<logSettings>()
499
500 Inherited, see L<Mail::Reporter/"Error handling">
501
502 =item $obj-E<gt>B<notImplemented>()
503
504 Inherited, see L<Mail::Reporter/"Error handling">
505
506 =item $obj-E<gt>B<report>( [$level] )
507
508 Inherited, see L<Mail::Reporter/"Error handling">
509
510 =item $obj-E<gt>B<reportAll>( [$level] )
511
512 Inherited, see L<Mail::Reporter/"Error handling">
513
514 =item $obj-E<gt>B<shortSize>( [$value] )
515
516 =item Mail::Box::POP3::Message-E<gt>B<shortSize>( [$value] )
517
518 Inherited, see L<Mail::Message/"Error handling">
519
520 =item $obj-E<gt>B<shortString>()
521
522 Inherited, see L<Mail::Message/"Error handling">
523
524 =item $obj-E<gt>B<trace>( [$level] )
525
526 Inherited, see L<Mail::Reporter/"Error handling">
527
528 =item $obj-E<gt>B<warnings>()
529
530 Inherited, see L<Mail::Reporter/"Error handling">
531
532 =back
533
534 =head2 Cleanup
535
536 Extends L<"Cleanup" in Mail::Box::Net::Message|Mail::Box::Net::Message/"Cleanup">.
537
538 =over 4
539
540 =item $obj-E<gt>B<DESTROY>()
541
542 Inherited, see L<Mail::Reporter/"Cleanup">
543
544 =item $obj-E<gt>B<destruct>()
545
546 Inherited, see L<Mail::Box::Message/"Cleanup">
547
548 =back
549
550 =head1 DETAILS
551
552 Extends L<"DETAILS" in Mail::Box::Net::Message|Mail::Box::Net::Message/"DETAILS">.
553
554 =head1 DIAGNOSTICS
555
556 =over 4
557
558 =item Error: Cannot coerce a $class object into a $class object
559
560 =item Error: Cannot include forward source as $include.
561
562 Unknown alternative for the L<forward(include)|Mail::Message::Construct::Forward/"Constructing a message">. Valid choices are
563 C<NO>, C<INLINE>, C<ATTACH>, and C<ENCAPSULATE>.
564
565 =item Error: Cannot include reply source as $include.
566
567 Unknown alternative for the C<include> option of L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. Valid
568 choices are C<NO>, C<INLINE>, and C<ATTACH>.
569
570 =item Error: Method bounce requires To, Cc, or Bcc
571
572 The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
573 else without modification; you must specified it's new destination.
574 If you have the urge not to specify any destination, you probably
575 are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
576 L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
577
578 =item Error: Method forwardAttach requires a preamble
579
580 =item Error: Method forwardEncapsulate requires a preamble
581
582 =item Error: No address to create forwarded to.
583
584 If a forward message is created, a destination address must be specified.
585
586 =item Error: No default mailer found to send message.
587
588 The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
589 find a mail transfer agent to sent this message. Specify a mailer
590 explicitly using the C<via> options.
591
592 =item Error: No rebuild rule $name defined.
593
594 =item Error: Only build() Mail::Message's; they are not in a folder yet
595
596 You may wish to construct a message to be stored in a some kind
597 of folder, but you need to do that in two steps. First, create a
598 normal L<Mail::Message|Mail::Message>, and then add it to the folder. During this
599 L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
600 into the right message type, adding storage information and the like.
601
602 =item Error: Package $package does not implement $method.
603
604 Fatal error: the specific package (or one of its superclasses) does not
605 implement this method where it should. This message means that some other
606 related classes do implement this method however the class at hand does
607 not. Probably you should investigate this and probably inform the author
608 of the package.
609
610 =item Error: Unable to read delayed body.
611
612 =item Error: Unable to read delayed head.
613
614 =item Error: coercion starts with some object
615
616 =back
617
618 =head1 SEE ALSO
619
620 This module is part of Mail-Box-POP3 distribution version 3.005,
621 built on May 03, 2019. Website: F<http://perl.overmeer.net/CPAN/>
622
623 =head1 LICENSE
624
625 Copyrights 2001-2019 by [Mark Overmeer]. For other contributors see ChangeLog.
626
627 This program is free software; you can redistribute it and/or modify it
628 under the same terms as Perl itself.
629 See F<http://dev.perl.org/licenses/>
630
0 # Copyrights 2001-2019 by [Mark Overmeer].
1 # For other contributors see ChangeLog.
2 # See the manual pages for details on the licensing terms.
3 # Pod stripped from pm file by OODoc 2.02.
40 # This code is part of distribution Mail-Box-POP3. Meta-POD processed with
51 # OODoc into POD and HTML manual-pages. See README.md
62 # Copyright Mark Overmeer. Licensed under the same terms as Perl itself.
73
84 package Mail::Box::POP3::Test;
9 use vars '$VERSION';
10 $VERSION = '3.005';
11
125 use base 'Exporter';
136
147 use strict;
0 # Copyrights 2001-2019 by [Mark Overmeer].
1 # For other contributors see ChangeLog.
2 # See the manual pages for details on the licensing terms.
3 # Pod stripped from pm file by OODoc 2.02.
40 # This code is part of distribution Mail-Box-POP3. Meta-POD processed with
51 # OODoc into POD and HTML manual-pages. See README.md
62 # Copyright Mark Overmeer. Licensed under the same terms as Perl itself.
73
84 package Mail::Box::POP3;
9 use vars '$VERSION';
10 $VERSION = '3.005';
11
125 use base 'Mail::Box::Net';
136
147 use strict;
2215 use File::Basename;
2316 use Carp;
2417
18 =chapter NAME
19
20 Mail::Box::POP3 - handle POP3 folders as client
21
22 =chapter SYNOPSIS
23
24 use Mail::Box::POP3;
25 my $folder = Mail::Box::POP3->new(folder => $ENV{MAIL}, ...);
26
27 =chapter DESCRIPTION
28
29 Maintain a folder which has its messages stored on a remote server. The
30 communication between the client application and the server is implemented
31 using the POP3 protocol. This class uses M<Mail::Transport::POP3> to
32 hide the transport of information, and focusses solely on the correct
33 handling of messages within a POP3 folder.
34
35 =chapter METHODS
36
37 =c_method new %options
38
39 For authentications, you have three choices: specify a foldername which
40 resembles an URL, or specify a pop-client object, or separate options
41 for user, password, pop-server and server-port.
42
43 =default folder <not applicable>
44 =default create <not applicable>
45
46 =default server_port 110
47 =default message_type M<Mail::Box::POP3::Message>
48
49 =option authenticate 'LOGIN'|'APOP'|'AUTO'
50 =default authenticate C<'AUTO'>
51 POP3 can use two methods of authentication: the old LOGIN protocol, which
52 transmits a username and password in plain text, and the newer APOP
53 protocol which uses MD5 encryption. APOP is therefore much better, however
54 not always supported by the server. With AUTO, first APOP is tried and
55 if that fails LOGIN.
56
57 =option pop_client OBJECT
58 =default pop_client undef
59 You may want to specify your own pop-client object. The object
60 which is passed must extend M<Mail::Transport::POP3>.
61
62 =examples
63
64 my $url = 'pop3://user:password@pop.xs4all.nl'
65 my $pop = Mail::Box::POP3->new($url);
66
67 my $pop = $mgr->open(type => 'pop3',
68 username => 'myname', password => 'mypassword',
69 server_name => 'pop.xs4all.nl');
70
71 =cut
2572
2673 sub init($)
2774 { my ($self, $args) = @_;
3885 $self;
3986 }
4087
88 =ci_method create $folder, %options
89 It is not possible to create a new folder on a POP3 server. This method
90 will always return C<false>.
91 =cut
4192
4293 sub create($@) { undef } # fails
4394
50101 || (exists $options{folder} && $options{folder} =~ m/^pop/);
51102 }
52103
104 =method addMessage $message
105 It is impossible to write messages to the average POP3 server. There are
106 extensions to the protocol which do permit it, however these are not
107 implemented (yet, patches welcome).
108
109 C<undef> is returned, and an error displayed. However, no complaint is
110 given when the $message is C<undef> itself.
111
112 =error You cannot write a message to a pop server (yet)
113 Some extensions to the POP3 protocol do permit writing messages to the server,
114 but the standard protocol only implements retreival. Feel invited to extend our
115 implementation with writing.
116
117 =cut
53118
54119 sub addMessage($)
55120 { my ($self, $message) = @_;
60125 undef;
61126 }
62127
128 =method addMessages $messages
129 As useless as M<addMessage()>. The only acceptable call to this method
130 is without any message.
131 =cut
63132
64133 sub addMessages(@)
65134 { my $self = shift;
84153 $self;
85154 }
86155
156 =method delete %options
157 It is not possible to delete a POP3 folder remotely: the best we can do
158 is remove all the messages in it... which is the action implemented here.
159 A notice is logged about this.
160
161 =default recursive <not used>
162
163 =warning POP3 folders cannot be deleted.
164 Each user has only one POP3 folder on a server. This folder is created and
165 deleted by the server's administrator only.
166
167 =cut
87168
88169 sub delete(@)
89170 { my $self = shift;
91172 undef;
92173 }
93174
175 =ci_method listSubFolders %options
176 The standard POP3 protocol does not support sub-folders, so an
177 empty list will be returned in any case.
178 =cut
94179
95180 sub listSubFolders(@) { () } # no
96181
182 =method openSubFolder %options
183 It is not possible to open a sub-folder for a POP3 folder, because that
184 is not supported by the official POP3 protocol. In any case, C<undef>
185 is returned to indicate a failure.
186 =cut
97187
98188 sub openSubFolder($@) { undef } # fails
99189
100190 sub topFolderWithMessages() { 1 } # Yes: only top folder
101191
192 =method update
193 NOT IMPLEMENTED YET
194 =cut
102195
103196 sub update() {shift->notImplemented}
104197
105198 #-------------------------------------------
106199
200 =section Internals
201
202 =method popClient %options
203 Returns the pop client object. This does not establish the connection.
204
205 =option use_ssl BOOLEAN
206 =default use_ssl <false>
207
208 =error Cannot create POP3 client for $name.
209 The connection to the POP3 server cannot be established. You may see
210 more, related, error messages about the failure.
211 =cut
107212
108213 sub popClient(%)
109214 { my ($self, %args) = @_;
153258 $self;
154259 }
155260
261 =method getHead $message
262 Read the header for the specified message from the remote server.
263 =cut
156264
157265 sub getHead($)
158266 { my ($self, $message) = @_;
184292 $head;
185293 }
186294
295 =method getHeadAndBody $message
296 Read all data for the specified message from the remote server.
297
298 =warning Message $uidl on POP3 server $name disappeared.
299 The server indicated the existence of this message before, however it
300 has no information about the message anymore.
301
302 =error Cannot find head back for $uidl on POP3 server $name.
303 The server told to have this message, but when asked for its headers, no
304 single line was returned. Did the message get destroyed?
305
306 =error Cannot read body for $uidl on POP3 server $name.
307 The message's headers are retrieved from the server, but the body seems
308 to be lost. Did the message get destroyed between reading the header
309 and reading the body?
310
311 =cut
187312
188313 sub getHeadAndBody($)
189314 { my ($self, $message) = @_;
222347 ($head, $body);
223348 }
224349
350 =method writeMessages %options
351
352 =error Update of $nr messages ignored for POP3 folder $name.
353 The standard POP3 implementation does not support writing from client back
354 to the server. Therefore, modifications may be lost.
355
356 =cut
225357
226358 sub writeMessages($@)
227359 { my ($self, $args) = @_;
236368
237369 #-------------------------------------------
238370
371 =chapter DETAILS
372
373 =section How POP3 folders work
374
375 Rfc1939 defines how POP3 works. POP3 is a really simple protocol to
376 receive messages from a server to a user's client. POP3 is also
377 really limited: it can only be used to fetch messages, but has not
378 many ways to limit the amount of network traffic, like the IMAP4
379 protocol has.
380
381 One POP3 account represents only one folder: there is no way of
382 sub-folders in POP3. POP3 doesn't support writing (except for
383 some message status flags).
384
385 =section This implementation
386
387 The protocol specifics are implemented in M<Mail::Transport::POP3>,
388 written by Liz Mattijsen. That module does not use any of the
389 other POP3 modules available on CPAN for the reason that MailBox
390 tries to be smarter: it is capable of re-establishing broken POP3
391 connection when the server supports UIDs.
392
393 The implementation has shown to work with many different POP servers.
394 In the test directory of the distribution, you will find a small
395 server implementation, which is used to test the client.
396
397 =cut
239398
240399
241400 1;
+0
-747
lib/Mail/Box/POP3.pod less more
0 =encoding utf8
1
2 =head1 NAME
3
4 Mail::Box::POP3 - handle POP3 folders as client
5
6 =head1 INHERITANCE
7
8 Mail::Box::POP3
9 is a Mail::Box::Net
10 is a Mail::Box
11 is a Mail::Reporter
12
13 Mail::Box::POP3 is extended by
14 Mail::Box::POP3s
15
16 =head1 SYNOPSIS
17
18 use Mail::Box::POP3;
19 my $folder = Mail::Box::POP3->new(folder => $ENV{MAIL}, ...);
20
21 =head1 DESCRIPTION
22
23 Maintain a folder which has its messages stored on a remote server. The
24 communication between the client application and the server is implemented
25 using the POP3 protocol. This class uses L<Mail::Transport::POP3|Mail::Transport::POP3> to
26 hide the transport of information, and focusses solely on the correct
27 handling of messages within a POP3 folder.
28
29 Extends L<"DESCRIPTION" in Mail::Box::Net|Mail::Box::Net/"DESCRIPTION">.
30
31 =head1 OVERLOADED
32
33 Extends L<"OVERLOADED" in Mail::Box::Net|Mail::Box::Net/"OVERLOADED">.
34
35 =over 4
36
37 =item overload: B<"">
38
39 Inherited, see L<Mail::Box/"OVERLOADED">
40
41 =item overload: B<@{}>
42
43 Inherited, see L<Mail::Box/"OVERLOADED">
44
45 =item overload: B<cmp>
46
47 Inherited, see L<Mail::Box/"OVERLOADED">
48
49 =back
50
51 =head1 METHODS
52
53 Extends L<"METHODS" in Mail::Box::Net|Mail::Box::Net/"METHODS">.
54
55 =head2 Constructors
56
57 Extends L<"Constructors" in Mail::Box::Net|Mail::Box::Net/"Constructors">.
58
59 =over 4
60
61 =item Mail::Box::POP3-E<gt>B<new>(%options)
62
63 For authentications, you have three choices: specify a foldername which
64 resembles an URL, or specify a pop-client object, or separate options
65 for user, password, pop-server and server-port.
66
67 -Option --Defined in --Default
68 access Mail::Box 'r'
69 authenticate 'AUTO'
70 body_delayed_type Mail::Box Mail::Message::Body::Delayed
71 body_type Mail::Box Mail::Message::Body::Lines
72 coerce_options Mail::Box []
73 create Mail::Box <not applicable>
74 extract Mail::Box 10240
75 field_type Mail::Box undef
76 fix_headers Mail::Box <false>
77 folder Mail::Box <not applicable>
78 folderdir Mail::Box <network location>
79 head_delayed_type Mail::Box Mail::Message::Head::Delayed
80 head_type Mail::Box Mail::Message::Head::Complete
81 keep_dups Mail::Box <false>
82 lock_file Mail::Box undef
83 lock_timeout Mail::Box 1 hour
84 lock_type Mail::Box 'NONE'
85 lock_wait Mail::Box 10 seconds
86 locker Mail::Box undef
87 log Mail::Reporter 'WARNINGS'
88 manager Mail::Box undef
89 message_type Mail::Box Mail::Box::POP3::Message
90 multipart_type Mail::Box Mail::Message::Body::Multipart
91 password Mail::Box::Net undef
92 pop_client undef
93 remove_when_empty Mail::Box <false>
94 save_on_exit Mail::Box <true>
95 server_name Mail::Box::Net undef
96 server_port Mail::Box::Net 110
97 trace Mail::Reporter 'WARNINGS'
98 trusted Mail::Box <false>
99 username Mail::Box::Net undef
100
101 =over 2
102
103 =item access => MODE
104
105 =item authenticate => 'LOGIN'|'APOP'|'AUTO'
106
107 POP3 can use two methods of authentication: the old LOGIN protocol, which
108 transmits a username and password in plain text, and the newer APOP
109 protocol which uses MD5 encryption. APOP is therefore much better, however
110 not always supported by the server. With AUTO, first APOP is tried and
111 if that fails LOGIN.
112
113 =item body_delayed_type => CLASS
114
115 =item body_type => CLASS|CODE
116
117 =item coerce_options => ARRAY
118
119 =item create => BOOLEAN
120
121 =item extract => INTEGER | CODE | METHOD | 'LAZY'|'ALWAYS'
122
123 =item field_type => CLASS
124
125 =item fix_headers => BOOLEAN
126
127 =item folder => FOLDERNAME
128
129 =item folderdir => DIRECTORY
130
131 =item head_delayed_type => CLASS
132
133 =item head_type => CLASS
134
135 =item keep_dups => BOOLEAN
136
137 =item lock_file => FILENAME
138
139 =item lock_timeout => SECONDS
140
141 =item lock_type => CLASS|STRING|ARRAY
142
143 =item lock_wait => SECONDS
144
145 =item locker => OBJECT
146
147 =item log => LEVEL
148
149 =item manager => MANAGER
150
151 =item message_type => CLASS
152
153 =item multipart_type => CLASS
154
155 =item password => STRING
156
157 =item pop_client => OBJECT
158
159 You may want to specify your own pop-client object. The object
160 which is passed must extend L<Mail::Transport::POP3|Mail::Transport::POP3>.
161
162 =item remove_when_empty => BOOLEAN
163
164 =item save_on_exit => BOOLEAN
165
166 =item server_name => HOSTNAME
167
168 =item server_port => INTEGER
169
170 =item trace => LEVEL
171
172 =item trusted => BOOLEAN
173
174 =item username => STRING
175
176 =back
177
178 example:
179
180 my $url = 'pop3://user:password@pop.xs4all.nl'
181 my $pop = Mail::Box::POP3->new($url);
182
183 my $pop = $mgr->open(type => 'pop3',
184 username => 'myname', password => 'mypassword',
185 server_name => 'pop.xs4all.nl');
186
187 =back
188
189 =head2 The folder
190
191 Extends L<"The folder" in Mail::Box::Net|Mail::Box::Net/"The folder">.
192
193 =over 4
194
195 =item $obj-E<gt>B<addMessage>($message)
196
197 It is impossible to write messages to the average POP3 server. There are
198 extensions to the protocol which do permit it, however these are not
199 implemented (yet, patches welcome).
200
201 C<undef> is returned, and an error displayed. However, no complaint is
202 given when the $message is C<undef> itself.
203
204 -Option--Defined in--Default
205 share Mail::Box <not used>
206
207 =over 2
208
209 =item share => BOOLEAN
210
211 =back
212
213 =item $obj-E<gt>B<addMessages>($messages)
214
215 As useless as L<addMessage()|Mail::Box::POP3/"METHODS">. The only acceptable call to this method
216 is without any message.
217
218 =item Mail::Box::POP3-E<gt>B<appendMessages>(%options)
219
220 Inherited, see L<Mail::Box/"The folder">
221
222 =item $obj-E<gt>B<close>(%options)
223
224 Inherited, see L<Mail::Box/"The folder">
225
226 =item $obj-E<gt>B<copyTo>($folder, %options)
227
228 Inherited, see L<Mail::Box/"The folder">
229
230 =item $obj-E<gt>B<delete>(%options)
231
232 It is not possible to delete a POP3 folder remotely: the best we can do
233 is remove all the messages in it... which is the action implemented here.
234 A notice is logged about this.
235
236 -Option --Defined in--Default
237 recursive Mail::Box <not used>
238
239 =over 2
240
241 =item recursive => BOOLEAN
242
243 =back
244
245 =item $obj-E<gt>B<folderdir>( [$directory] )
246
247 Inherited, see L<Mail::Box/"The folder">
248
249 =item $obj-E<gt>B<name>()
250
251 Inherited, see L<Mail::Box/"The folder">
252
253 =item $obj-E<gt>B<organization>()
254
255 Inherited, see L<Mail::Box/"The folder">
256
257 =item $obj-E<gt>B<size>()
258
259 Inherited, see L<Mail::Box/"The folder">
260
261 =item $obj-E<gt>B<type>()
262
263 Inherited, see L<Mail::Box/"The folder">
264
265 =item $obj-E<gt>B<update>()
266
267 NOT IMPLEMENTED YET
268
269 =item $obj-E<gt>B<url>()
270
271 Inherited, see L<Mail::Box/"The folder">
272
273 =back
274
275 =head2 Folder flags
276
277 Extends L<"Folder flags" in Mail::Box::Net|Mail::Box::Net/"Folder flags">.
278
279 =over 4
280
281 =item $obj-E<gt>B<access>()
282
283 Inherited, see L<Mail::Box/"Folder flags">
284
285 =item $obj-E<gt>B<isModified>()
286
287 Inherited, see L<Mail::Box/"Folder flags">
288
289 =item $obj-E<gt>B<modified>( [BOOLEAN] )
290
291 Inherited, see L<Mail::Box/"Folder flags">
292
293 =item $obj-E<gt>B<writable>()
294
295 Inherited, see L<Mail::Box/"Folder flags">
296
297 =back
298
299 =head2 The messages
300
301 Extends L<"The messages" in Mail::Box::Net|Mail::Box::Net/"The messages">.
302
303 =over 4
304
305 =item $obj-E<gt>B<current>( [$number|$message|$message_id] )
306
307 Inherited, see L<Mail::Box/"The messages">
308
309 =item $obj-E<gt>B<find>($message_id)
310
311 Inherited, see L<Mail::Box/"The messages">
312
313 =item $obj-E<gt>B<findFirstLabeled>( $label, [BOOLEAN, [$msgs]] )
314
315 Inherited, see L<Mail::Box/"The messages">
316
317 =item $obj-E<gt>B<message>( $index, [$message] )
318
319 Inherited, see L<Mail::Box/"The messages">
320
321 =item $obj-E<gt>B<messageId>( $message_id, [$message] )
322
323 Inherited, see L<Mail::Box/"The messages">
324
325 =item $obj-E<gt>B<messageIds>()
326
327 Inherited, see L<Mail::Box/"The messages">
328
329 =item $obj-E<gt>B<messages>( <'ALL'|$range|'ACTIVE'|'DELETED'|$label| !$label|$filter> )
330
331 Inherited, see L<Mail::Box/"The messages">
332
333 =item $obj-E<gt>B<nrMessages>(%options)
334
335 Inherited, see L<Mail::Box/"The messages">
336
337 =item $obj-E<gt>B<scanForMessages>($message, $message_ids, $timespan, $window)
338
339 Inherited, see L<Mail::Box/"The messages">
340
341 =back
342
343 =head2 Sub-folders
344
345 Extends L<"Sub-folders" in Mail::Box::Net|Mail::Box::Net/"Sub-folders">.
346
347 =over 4
348
349 =item $obj-E<gt>B<listSubFolders>(%options)
350
351 =item Mail::Box::POP3-E<gt>B<listSubFolders>(%options)
352
353 The standard POP3 protocol does not support sub-folders, so an
354 empty list will be returned in any case.
355
356 -Option --Defined in --Default
357 check Mail::Box <false>
358 folder Mail::Box <from calling object>
359 folderdir Mail::Box <from folder>
360 skip_empty Mail::Box <false>
361
362 =over 2
363
364 =item check => BOOLEAN
365
366 =item folder => FOLDERNAME
367
368 =item folderdir => DIRECTORY
369
370 =item skip_empty => BOOL
371
372 =back
373
374 =item $obj-E<gt>B<nameOfSubFolder>( $subname, [$parentname] )
375
376 =item Mail::Box::POP3-E<gt>B<nameOfSubFolder>( $subname, [$parentname] )
377
378 Inherited, see L<Mail::Box/"Sub-folders">
379
380 =item $obj-E<gt>B<openRelatedFolder>(%options)
381
382 Inherited, see L<Mail::Box/"Sub-folders">
383
384 =item $obj-E<gt>B<openSubFolder>(%options)
385
386 It is not possible to open a sub-folder for a POP3 folder, because that
387 is not supported by the official POP3 protocol. In any case, C<undef>
388 is returned to indicate a failure.
389
390 =item $obj-E<gt>B<topFolderWithMessages>()
391
392 =item Mail::Box::POP3-E<gt>B<topFolderWithMessages>()
393
394 Inherited, see L<Mail::Box/"Sub-folders">
395
396 =back
397
398 =head2 Internals
399
400 Extends L<"Internals" in Mail::Box::Net|Mail::Box::Net/"Internals">.
401
402 =over 4
403
404 =item $obj-E<gt>B<coerce>($message, %options)
405
406 Inherited, see L<Mail::Box/"Internals">
407
408 =item $obj-E<gt>B<create>($folder, %options)
409
410 =item Mail::Box::POP3-E<gt>B<create>($folder, %options)
411
412 It is not possible to create a new folder on a POP3 server. This method
413 will always return C<false>.
414
415 -Option --Defined in--Default
416 folderdir Mail::Box undef
417
418 =over 2
419
420 =item folderdir => DIRECTORY
421
422 =back
423
424 =item $obj-E<gt>B<determineBodyType>($message, $head)
425
426 Inherited, see L<Mail::Box/"Internals">
427
428 =item Mail::Box::POP3-E<gt>B<foundIn>( [$foldername], %options )
429
430 Inherited, see L<Mail::Box/"Internals">
431
432 =item $obj-E<gt>B<getHead>($message)
433
434 Read the header for the specified message from the remote server.
435
436 =item $obj-E<gt>B<getHeadAndBody>($message)
437
438 Read all data for the specified message from the remote server.
439
440 =item $obj-E<gt>B<lineSeparator>( [<STRING|'CR'|'LF'|'CRLF'>] )
441
442 Inherited, see L<Mail::Box/"Internals">
443
444 =item $obj-E<gt>B<locker>()
445
446 Inherited, see L<Mail::Box/"Internals">
447
448 =item $obj-E<gt>B<popClient>(%options)
449
450 Returns the pop client object. This does not establish the connection.
451
452 -Option --Default
453 use_ssl <false>
454
455 =over 2
456
457 =item use_ssl => BOOLEAN
458
459 =back
460
461 =item $obj-E<gt>B<read>(%options)
462
463 Inherited, see L<Mail::Box/"Internals">
464
465 =item $obj-E<gt>B<readMessages>(%options)
466
467 Inherited, see L<Mail::Box/"Internals">
468
469 =item $obj-E<gt>B<storeMessage>($message)
470
471 Inherited, see L<Mail::Box/"Internals">
472
473 =item $obj-E<gt>B<toBeThreaded>($messages)
474
475 Inherited, see L<Mail::Box/"Internals">
476
477 =item $obj-E<gt>B<toBeUnthreaded>($messages)
478
479 Inherited, see L<Mail::Box/"Internals">
480
481 =item $obj-E<gt>B<updateMessages>(%options)
482
483 Inherited, see L<Mail::Box/"Internals">
484
485 =item $obj-E<gt>B<write>(%options)
486
487 Inherited, see L<Mail::Box/"Internals">
488
489 =item $obj-E<gt>B<writeMessages>(%options)
490
491 -Option --Defined in--Default
492 messages Mail::Box <required>
493
494 =over 2
495
496 =item messages => ARRAY
497
498 =back
499
500 =back
501
502 =head2 Other methods
503
504 Extends L<"Other methods" in Mail::Box::Net|Mail::Box::Net/"Other methods">.
505
506 =over 4
507
508 =item $obj-E<gt>B<timespan2seconds>($time)
509
510 =item Mail::Box::POP3-E<gt>B<timespan2seconds>($time)
511
512 Inherited, see L<Mail::Box/"Other methods">
513
514 =back
515
516 =head2 Error handling
517
518 Extends L<"Error handling" in Mail::Box::Net|Mail::Box::Net/"Error handling">.
519
520 =over 4
521
522 =item $obj-E<gt>B<AUTOLOAD>()
523
524 Inherited, see L<Mail::Reporter/"Error handling">
525
526 =item $obj-E<gt>B<addReport>($object)
527
528 Inherited, see L<Mail::Reporter/"Error handling">
529
530 =item $obj-E<gt>B<defaultTrace>( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
531
532 =item Mail::Box::POP3-E<gt>B<defaultTrace>( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
533
534 Inherited, see L<Mail::Reporter/"Error handling">
535
536 =item $obj-E<gt>B<errors>()
537
538 Inherited, see L<Mail::Reporter/"Error handling">
539
540 =item $obj-E<gt>B<log>( [$level, [$strings]] )
541
542 =item Mail::Box::POP3-E<gt>B<log>( [$level, [$strings]] )
543
544 Inherited, see L<Mail::Reporter/"Error handling">
545
546 =item $obj-E<gt>B<logPriority>($level)
547
548 =item Mail::Box::POP3-E<gt>B<logPriority>($level)
549
550 Inherited, see L<Mail::Reporter/"Error handling">
551
552 =item $obj-E<gt>B<logSettings>()
553
554 Inherited, see L<Mail::Reporter/"Error handling">
555
556 =item $obj-E<gt>B<notImplemented>()
557
558 Inherited, see L<Mail::Reporter/"Error handling">
559
560 =item $obj-E<gt>B<report>( [$level] )
561
562 Inherited, see L<Mail::Reporter/"Error handling">
563
564 =item $obj-E<gt>B<reportAll>( [$level] )
565
566 Inherited, see L<Mail::Reporter/"Error handling">
567
568 =item $obj-E<gt>B<trace>( [$level] )
569
570 Inherited, see L<Mail::Reporter/"Error handling">
571
572 =item $obj-E<gt>B<warnings>()
573
574 Inherited, see L<Mail::Reporter/"Error handling">
575
576 =back
577
578 =head2 Cleanup
579
580 Extends L<"Cleanup" in Mail::Box::Net|Mail::Box::Net/"Cleanup">.
581
582 =over 4
583
584 =item $obj-E<gt>B<DESTROY>()
585
586 Inherited, see L<Mail::Box/"Cleanup">
587
588 =back
589
590 =head1 DETAILS
591
592 Extends L<"DETAILS" in Mail::Box::Net|Mail::Box::Net/"DETAILS">.
593
594 =head2 Different kinds of folders
595
596 Extends L<"Different kinds of folders" in Mail::Box::Net|Mail::Box::Net/"Different kinds of folders">.
597
598 =head2 Available folder types
599
600 Extends L<"Available folder types" in Mail::Box::Net|Mail::Box::Net/"Available folder types">.
601
602 =head2 Folder class implementation
603
604 Extends L<"Folder class implementation" in Mail::Box::Net|Mail::Box::Net/"Folder class implementation">.
605
606 =head2 How POP3 folders work
607
608 Rfc1939 defines how POP3 works. POP3 is a really simple protocol to
609 receive messages from a server to a user's client. POP3 is also
610 really limited: it can only be used to fetch messages, but has not
611 many ways to limit the amount of network traffic, like the IMAP4
612 protocol has.
613
614 One POP3 account represents only one folder: there is no way of
615 sub-folders in POP3. POP3 doesn't support writing (except for
616 some message status flags).
617
618 =head2 This implementation
619
620 The protocol specifics are implemented in L<Mail::Transport::POP3|Mail::Transport::POP3>,
621 written by Liz Mattijsen. That module does not use any of the
622 other POP3 modules available on CPAN for the reason that MailBox
623 tries to be smarter: it is capable of re-establishing broken POP3
624 connection when the server supports UIDs.
625
626 The implementation has shown to work with many different POP servers.
627 In the test directory of the distribution, you will find a small
628 server implementation, which is used to test the client.
629
630 =head1 DIAGNOSTICS
631
632 =over 4
633
634 =item Error: Cannot create POP3 client for $name.
635
636 The connection to the POP3 server cannot be established. You may see
637 more, related, error messages about the failure.
638
639 =item Error: Cannot find head back for $uidl on POP3 server $name.
640
641 The server told to have this message, but when asked for its headers, no
642 single line was returned. Did the message get destroyed?
643
644 =item Error: Cannot read body for $uidl on POP3 server $name.
645
646 The message's headers are retrieved from the server, but the body seems
647 to be lost. Did the message get destroyed between reading the header
648 and reading the body?
649
650 =item Warning: Changes not written to read-only folder $self.
651
652 You have opened the folder read-only --which is the default set
653 by L<new(access)|Mail::Box/"Constructors">--, made modifications, and now want to close it.
654 Set L<close(force)|Mail::Box/"The folder"> if you want to overrule the access mode, or close
655 the folder with L<close(write)|Mail::Box/"The folder"> set to C<NEVER>.
656
657 =item Error: Copying failed for one message.
658
659 For some reason, for instance disc full, removed by external process, or
660 read-protection, it is impossible to copy one of the messages. Copying will
661 proceed for the other messages.
662
663 =item Error: Destination folder $name is not writable.
664
665 The folder where the messages are copied to is not opened with write
666 access (see L<new(access)|Mail::Box/"Constructors">). This has no relation with write permission
667 to the folder which is controlled by your operating system.
668
669 =item Warning: Different messages with id $msgid
670
671 The message id is discovered more than once within the same folder, but the
672 content of the message seems to be different. This should not be possible:
673 each message must be unique.
674
675 =item Error: Folder $name is opened read-only
676
677 You can not write to this folder unless you have opened the folder to
678 write or append with L<new(access)|Mail::Box/"Constructors">, or the C<force> option is set true.
679
680 =item Error: Invalid timespan '$timespan' specified.
681
682 The string does not follow the strict rules of the time span syntax which
683 is permitted as parameter.
684
685 =item Warning: Message $uidl on POP3 server $name disappeared.
686
687 The server indicated the existence of this message before, however it
688 has no information about the message anymore.
689
690 =item Warning: Message-id '$msgid' does not contain a domain.
691
692 According to the RFCs, message-ids need to contain a unique random part,
693 then an C<@>, and then a domain name. This is made to avoid the creation
694 of two messages with the same id. The warning emerges when the C<@> is
695 missing from the string.
696
697 =item Warning: POP3 folders cannot be deleted.
698
699 Each user has only one POP3 folder on a server. This folder is created and
700 deleted by the server's administrator only.
701
702 =item Error: Package $package does not implement $method.
703
704 Fatal error: the specific package (or one of its superclasses) does not
705 implement this method where it should. This message means that some other
706 related classes do implement this method however the class at hand does
707 not. Probably you should investigate this and probably inform the author
708 of the package.
709
710 =item Error: Unable to create subfolder $name of $folder.
711
712 The copy includes the subfolders, but for some reason it was not possible
713 to copy one of these. Copying will proceed for all other sub-folders.
714
715 =item Error: Update of $nr messages ignored for POP3 folder $name.
716
717 The standard POP3 implementation does not support writing from client back
718 to the server. Therefore, modifications may be lost.
719
720 =item Error: Writing folder $name failed
721
722 For some reason (you probably got more error messages about this problem)
723 it is impossible to write the folder, although you should because there
724 were changes made.
725
726 =item Error: You cannot write a message to a pop server (yet)
727
728 Some extensions to the POP3 protocol do permit writing messages to the server,
729 but the standard protocol only implements retreival. Feel invited to extend our
730 implementation with writing.
731
732 =back
733
734 =head1 SEE ALSO
735
736 This module is part of Mail-Box-POP3 distribution version 3.005,
737 built on May 03, 2019. Website: F<http://perl.overmeer.net/CPAN/>
738
739 =head1 LICENSE
740
741 Copyrights 2001-2019 by [Mark Overmeer]. For other contributors see ChangeLog.
742
743 This program is free software; you can redistribute it and/or modify it
744 under the same terms as Perl itself.
745 See F<http://dev.perl.org/licenses/>
746
0 # Copyrights 2001-2019 by [Mark Overmeer].
1 # For other contributors see ChangeLog.
2 # See the manual pages for details on the licensing terms.
3 # Pod stripped from pm file by OODoc 2.02.
40 # This code is part of distribution Mail-Box-POP3. Meta-POD processed with
51 # OODoc into POD and HTML manual-pages. See README.md
62 # Copyright Mark Overmeer. Licensed under the same terms as Perl itself.
73
84 package Mail::Box::POP3s;
9 use vars '$VERSION';
10 $VERSION = '3.005';
11
125 use base 'Mail::Box::POP3';
136
147 use strict;
158 use warnings;
169
10 =chapter NAME
11
12 Mail::Box::POP3s - handle secure POP3 folders as client
13
14 =chapter SYNOPSIS
15
16 use Mail::Box::POP3s;
17 my $folder = Mail::Box::POP3s->new(folder => $ENV{MAIL}, ...);
18
19 =chapter DESCRIPTION
20
21 This module mainly extends M<Mail::Box::POP3>.
22
23 =chapter METHODS
24
25 =c_method new %options
26
27 =default server_port 995
28 =cut
1729
1830 sub init($)
1931 { my ($self, $args) = @_;
2638
2739 #-------------------------------------------
2840
41 =section Internals
42 =cut
2943
3044 sub popClient(%)
3145 { my $self = shift;
+0
-610
lib/Mail/Box/POP3s.pod less more
0 =encoding utf8
1
2 =head1 NAME
3
4 Mail::Box::POP3s - handle secure POP3 folders as client
5
6 =head1 INHERITANCE
7
8 Mail::Box::POP3s
9 is a Mail::Box::POP3
10 is a Mail::Box::Net
11 is a Mail::Box
12 is a Mail::Reporter
13
14 =head1 SYNOPSIS
15
16 use Mail::Box::POP3s;
17 my $folder = Mail::Box::POP3s->new(folder => $ENV{MAIL}, ...);
18
19 =head1 DESCRIPTION
20
21 This module mainly extends L<Mail::Box::POP3|Mail::Box::POP3>.
22
23 Extends L<"DESCRIPTION" in Mail::Box::POP3|Mail::Box::POP3/"DESCRIPTION">.
24
25 =head1 OVERLOADED
26
27 Extends L<"OVERLOADED" in Mail::Box::POP3|Mail::Box::POP3/"OVERLOADED">.
28
29 =over 4
30
31 =item overload: B<"">
32
33 Inherited, see L<Mail::Box/"OVERLOADED">
34
35 =item overload: B<@{}>
36
37 Inherited, see L<Mail::Box/"OVERLOADED">
38
39 =item overload: B<cmp>
40
41 Inherited, see L<Mail::Box/"OVERLOADED">
42
43 =back
44
45 =head1 METHODS
46
47 Extends L<"METHODS" in Mail::Box::POP3|Mail::Box::POP3/"METHODS">.
48
49 =head2 Constructors
50
51 Extends L<"Constructors" in Mail::Box::POP3|Mail::Box::POP3/"Constructors">.
52
53 =over 4
54
55 =item Mail::Box::POP3s-E<gt>B<new>(%options)
56
57 -Option --Defined in --Default
58 access Mail::Box 'r'
59 authenticate Mail::Box::POP3 'AUTO'
60 body_delayed_type Mail::Box Mail::Message::Body::Delayed
61 body_type Mail::Box Mail::Message::Body::Lines
62 coerce_options Mail::Box []
63 create Mail::Box <not applicable>
64 extract Mail::Box 10240
65 field_type Mail::Box undef
66 fix_headers Mail::Box <false>
67 folder Mail::Box <not applicable>
68 folderdir Mail::Box <network location>
69 head_delayed_type Mail::Box Mail::Message::Head::Delayed
70 head_type Mail::Box Mail::Message::Head::Complete
71 keep_dups Mail::Box <false>
72 lock_file Mail::Box undef
73 lock_timeout Mail::Box 1 hour
74 lock_type Mail::Box 'NONE'
75 lock_wait Mail::Box 10 seconds
76 locker Mail::Box undef
77 log Mail::Reporter 'WARNINGS'
78 manager Mail::Box undef
79 message_type Mail::Box Mail::Box::POP3::Message
80 multipart_type Mail::Box Mail::Message::Body::Multipart
81 password Mail::Box::Net undef
82 pop_client Mail::Box::POP3 undef
83 remove_when_empty Mail::Box <false>
84 save_on_exit Mail::Box <true>
85 server_name Mail::Box::Net undef
86 server_port Mail::Box::Net 995
87 trace Mail::Reporter 'WARNINGS'
88 trusted Mail::Box <false>
89 username Mail::Box::Net undef
90
91 =over 2
92
93 =item access => MODE
94
95 =item authenticate => 'LOGIN'|'APOP'|'AUTO'
96
97 =item body_delayed_type => CLASS
98
99 =item body_type => CLASS|CODE
100
101 =item coerce_options => ARRAY
102
103 =item create => BOOLEAN
104
105 =item extract => INTEGER | CODE | METHOD | 'LAZY'|'ALWAYS'
106
107 =item field_type => CLASS
108
109 =item fix_headers => BOOLEAN
110
111 =item folder => FOLDERNAME
112
113 =item folderdir => DIRECTORY
114
115 =item head_delayed_type => CLASS
116
117 =item head_type => CLASS
118
119 =item keep_dups => BOOLEAN
120
121 =item lock_file => FILENAME
122
123 =item lock_timeout => SECONDS
124
125 =item lock_type => CLASS|STRING|ARRAY
126
127 =item lock_wait => SECONDS
128
129 =item locker => OBJECT
130
131 =item log => LEVEL
132
133 =item manager => MANAGER
134
135 =item message_type => CLASS
136
137 =item multipart_type => CLASS
138
139 =item password => STRING
140
141 =item pop_client => OBJECT
142
143 =item remove_when_empty => BOOLEAN
144
145 =item save_on_exit => BOOLEAN
146
147 =item server_name => HOSTNAME
148
149 =item server_port => INTEGER
150
151 =item trace => LEVEL
152
153 =item trusted => BOOLEAN
154
155 =item username => STRING
156
157 =back
158
159 =back
160
161 =head2 The folder
162
163 Extends L<"The folder" in Mail::Box::POP3|Mail::Box::POP3/"The folder">.
164
165 =over 4
166
167 =item $obj-E<gt>B<addMessage>($message)
168
169 Inherited, see L<Mail::Box::POP3/"METHODS">
170
171 =item $obj-E<gt>B<addMessages>($messages)
172
173 Inherited, see L<Mail::Box::POP3/"METHODS">
174
175 =item Mail::Box::POP3s-E<gt>B<appendMessages>(%options)
176
177 Inherited, see L<Mail::Box/"The folder">
178
179 =item $obj-E<gt>B<close>(%options)
180
181 Inherited, see L<Mail::Box/"The folder">
182
183 =item $obj-E<gt>B<copyTo>($folder, %options)
184
185 Inherited, see L<Mail::Box/"The folder">
186
187 =item $obj-E<gt>B<delete>(%options)
188
189 Inherited, see L<Mail::Box::POP3/"METHODS">
190
191 =item $obj-E<gt>B<folderdir>( [$directory] )
192
193 Inherited, see L<Mail::Box/"The folder">
194
195 =item $obj-E<gt>B<name>()
196
197 Inherited, see L<Mail::Box/"The folder">
198
199 =item $obj-E<gt>B<organization>()
200
201 Inherited, see L<Mail::Box/"The folder">
202
203 =item $obj-E<gt>B<size>()
204
205 Inherited, see L<Mail::Box/"The folder">
206
207 =item $obj-E<gt>B<type>()
208
209 Inherited, see L<Mail::Box/"The folder">
210
211 =item $obj-E<gt>B<update>()
212
213 Inherited, see L<Mail::Box::POP3/"METHODS">
214
215 =item $obj-E<gt>B<url>()
216
217 Inherited, see L<Mail::Box/"The folder">
218
219 =back
220
221 =head2 Folder flags
222
223 Extends L<"Folder flags" in Mail::Box::POP3|Mail::Box::POP3/"Folder flags">.
224
225 =over 4
226
227 =item $obj-E<gt>B<access>()
228
229 Inherited, see L<Mail::Box/"Folder flags">
230
231 =item $obj-E<gt>B<isModified>()
232
233 Inherited, see L<Mail::Box/"Folder flags">
234
235 =item $obj-E<gt>B<modified>( [BOOLEAN] )
236
237 Inherited, see L<Mail::Box/"Folder flags">
238
239 =item $obj-E<gt>B<writable>()
240
241 Inherited, see L<Mail::Box/"Folder flags">
242
243 =back
244
245 =head2 The messages
246
247 Extends L<"The messages" in Mail::Box::POP3|Mail::Box::POP3/"The messages">.
248
249 =over 4
250
251 =item $obj-E<gt>B<current>( [$number|$message|$message_id] )
252
253 Inherited, see L<Mail::Box/"The messages">
254
255 =item $obj-E<gt>B<find>($message_id)
256
257 Inherited, see L<Mail::Box/"The messages">
258
259 =item $obj-E<gt>B<findFirstLabeled>( $label, [BOOLEAN, [$msgs]] )
260
261 Inherited, see L<Mail::Box/"The messages">
262
263 =item $obj-E<gt>B<message>( $index, [$message] )
264
265 Inherited, see L<Mail::Box/"The messages">
266
267 =item $obj-E<gt>B<messageId>( $message_id, [$message] )
268
269 Inherited, see L<Mail::Box/"The messages">
270
271 =item $obj-E<gt>B<messageIds>()
272
273 Inherited, see L<Mail::Box/"The messages">
274
275 =item $obj-E<gt>B<messages>( <'ALL'|$range|'ACTIVE'|'DELETED'|$label| !$label|$filter> )
276
277 Inherited, see L<Mail::Box/"The messages">
278
279 =item $obj-E<gt>B<nrMessages>(%options)
280
281 Inherited, see L<Mail::Box/"The messages">
282
283 =item $obj-E<gt>B<scanForMessages>($message, $message_ids, $timespan, $window)
284
285 Inherited, see L<Mail::Box/"The messages">
286
287 =back
288
289 =head2 Sub-folders
290
291 Extends L<"Sub-folders" in Mail::Box::POP3|Mail::Box::POP3/"Sub-folders">.
292
293 =over 4
294
295 =item $obj-E<gt>B<listSubFolders>(%options)
296
297 =item Mail::Box::POP3s-E<gt>B<listSubFolders>(%options)
298
299 Inherited, see L<Mail::Box::POP3/"METHODS">
300
301 =item $obj-E<gt>B<nameOfSubFolder>( $subname, [$parentname] )
302
303 =item Mail::Box::POP3s-E<gt>B<nameOfSubFolder>( $subname, [$parentname] )
304
305 Inherited, see L<Mail::Box/"Sub-folders">
306
307 =item $obj-E<gt>B<openRelatedFolder>(%options)
308
309 Inherited, see L<Mail::Box/"Sub-folders">
310
311 =item $obj-E<gt>B<openSubFolder>(%options)
312
313 Inherited, see L<Mail::Box::POP3/"METHODS">
314
315 =item $obj-E<gt>B<topFolderWithMessages>()
316
317 =item Mail::Box::POP3s-E<gt>B<topFolderWithMessages>()
318
319 Inherited, see L<Mail::Box/"Sub-folders">
320
321 =back
322
323 =head2 Internals
324
325 Extends L<"Internals" in Mail::Box::POP3|Mail::Box::POP3/"Internals">.
326
327 =over 4
328
329 =item $obj-E<gt>B<coerce>($message, %options)
330
331 Inherited, see L<Mail::Box/"Internals">
332
333 =item $obj-E<gt>B<create>($folder, %options)
334
335 =item Mail::Box::POP3s-E<gt>B<create>($folder, %options)
336
337 Inherited, see L<Mail::Box::POP3/"METHODS">
338
339 =item $obj-E<gt>B<determineBodyType>($message, $head)
340
341 Inherited, see L<Mail::Box/"Internals">
342
343 =item Mail::Box::POP3s-E<gt>B<foundIn>( [$foldername], %options )
344
345 Inherited, see L<Mail::Box/"Internals">
346
347 =item $obj-E<gt>B<getHead>($message)
348
349 Inherited, see L<Mail::Box::POP3/"Internals">
350
351 =item $obj-E<gt>B<getHeadAndBody>($message)
352
353 Inherited, see L<Mail::Box::POP3/"Internals">
354
355 =item $obj-E<gt>B<lineSeparator>( [<STRING|'CR'|'LF'|'CRLF'>] )
356
357 Inherited, see L<Mail::Box/"Internals">
358
359 =item $obj-E<gt>B<locker>()
360
361 Inherited, see L<Mail::Box/"Internals">
362
363 =item $obj-E<gt>B<popClient>(%options)
364
365 Inherited, see L<Mail::Box::POP3/"Internals">
366
367 =item $obj-E<gt>B<read>(%options)
368
369 Inherited, see L<Mail::Box/"Internals">
370
371 =item $obj-E<gt>B<readMessages>(%options)
372
373 Inherited, see L<Mail::Box/"Internals">
374
375 =item $obj-E<gt>B<storeMessage>($message)
376
377 Inherited, see L<Mail::Box/"Internals">
378
379 =item $obj-E<gt>B<toBeThreaded>($messages)
380
381 Inherited, see L<Mail::Box/"Internals">
382
383 =item $obj-E<gt>B<toBeUnthreaded>($messages)
384
385 Inherited, see L<Mail::Box/"Internals">
386
387 =item $obj-E<gt>B<updateMessages>(%options)
388
389 Inherited, see L<Mail::Box/"Internals">
390
391 =item $obj-E<gt>B<write>(%options)
392
393 Inherited, see L<Mail::Box/"Internals">
394
395 =item $obj-E<gt>B<writeMessages>(%options)
396
397 Inherited, see L<Mail::Box::POP3/"Internals">
398
399 =back
400
401 =head2 Other methods
402
403 Extends L<"Other methods" in Mail::Box::POP3|Mail::Box::POP3/"Other methods">.
404
405 =over 4
406
407 =item $obj-E<gt>B<timespan2seconds>($time)
408
409 =item Mail::Box::POP3s-E<gt>B<timespan2seconds>($time)
410
411 Inherited, see L<Mail::Box/"Other methods">
412
413 =back
414
415 =head2 Error handling
416
417 Extends L<"Error handling" in Mail::Box::POP3|Mail::Box::POP3/"Error handling">.
418
419 =over 4
420
421 =item $obj-E<gt>B<AUTOLOAD>()
422
423 Inherited, see L<Mail::Reporter/"Error handling">
424
425 =item $obj-E<gt>B<addReport>($object)
426
427 Inherited, see L<Mail::Reporter/"Error handling">
428
429 =item $obj-E<gt>B<defaultTrace>( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
430
431 =item Mail::Box::POP3s-E<gt>B<defaultTrace>( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
432
433 Inherited, see L<Mail::Reporter/"Error handling">
434
435 =item $obj-E<gt>B<errors>()
436
437 Inherited, see L<Mail::Reporter/"Error handling">
438
439 =item $obj-E<gt>B<log>( [$level, [$strings]] )
440
441 =item Mail::Box::POP3s-E<gt>B<log>( [$level, [$strings]] )
442
443 Inherited, see L<Mail::Reporter/"Error handling">
444
445 =item $obj-E<gt>B<logPriority>($level)
446
447 =item Mail::Box::POP3s-E<gt>B<logPriority>($level)
448
449 Inherited, see L<Mail::Reporter/"Error handling">
450
451 =item $obj-E<gt>B<logSettings>()
452
453 Inherited, see L<Mail::Reporter/"Error handling">
454
455 =item $obj-E<gt>B<notImplemented>()
456
457 Inherited, see L<Mail::Reporter/"Error handling">
458
459 =item $obj-E<gt>B<report>( [$level] )
460
461 Inherited, see L<Mail::Reporter/"Error handling">
462
463 =item $obj-E<gt>B<reportAll>( [$level] )
464
465 Inherited, see L<Mail::Reporter/"Error handling">
466
467 =item $obj-E<gt>B<trace>( [$level] )
468
469 Inherited, see L<Mail::Reporter/"Error handling">
470
471 =item $obj-E<gt>B<warnings>()
472
473 Inherited, see L<Mail::Reporter/"Error handling">
474
475 =back
476
477 =head2 Cleanup
478
479 Extends L<"Cleanup" in Mail::Box::POP3|Mail::Box::POP3/"Cleanup">.
480
481 =over 4
482
483 =item $obj-E<gt>B<DESTROY>()
484
485 Inherited, see L<Mail::Box/"Cleanup">
486
487 =back
488
489 =head1 DETAILS
490
491 Extends L<"DETAILS" in Mail::Box::POP3|Mail::Box::POP3/"DETAILS">.
492
493 =head1 DIAGNOSTICS
494
495 =over 4
496
497 =item Error: Cannot create POP3 client for $name.
498
499 The connection to the POP3 server cannot be established. You may see
500 more, related, error messages about the failure.
501
502 =item Error: Cannot find head back for $uidl on POP3 server $name.
503
504 The server told to have this message, but when asked for its headers, no
505 single line was returned. Did the message get destroyed?
506
507 =item Error: Cannot read body for $uidl on POP3 server $name.
508
509 The message's headers are retrieved from the server, but the body seems
510 to be lost. Did the message get destroyed between reading the header
511 and reading the body?
512
513 =item Warning: Changes not written to read-only folder $self.
514
515 You have opened the folder read-only --which is the default set
516 by L<new(access)|Mail::Box/"Constructors">--, made modifications, and now want to close it.
517 Set L<close(force)|Mail::Box/"The folder"> if you want to overrule the access mode, or close
518 the folder with L<close(write)|Mail::Box/"The folder"> set to C<NEVER>.
519
520 =item Error: Copying failed for one message.
521
522 For some reason, for instance disc full, removed by external process, or
523 read-protection, it is impossible to copy one of the messages. Copying will
524 proceed for the other messages.
525
526 =item Error: Destination folder $name is not writable.
527
528 The folder where the messages are copied to is not opened with write
529 access (see L<new(access)|Mail::Box/"Constructors">). This has no relation with write permission
530 to the folder which is controlled by your operating system.
531
532 =item Warning: Different messages with id $msgid
533
534 The message id is discovered more than once within the same folder, but the
535 content of the message seems to be different. This should not be possible:
536 each message must be unique.
537
538 =item Error: Folder $name is opened read-only
539
540 You can not write to this folder unless you have opened the folder to
541 write or append with L<new(access)|Mail::Box/"Constructors">, or the C<force> option is set true.
542
543 =item Error: Invalid timespan '$timespan' specified.
544
545 The string does not follow the strict rules of the time span syntax which
546 is permitted as parameter.
547
548 =item Warning: Message $uidl on POP3 server $name disappeared.
549
550 The server indicated the existence of this message before, however it
551 has no information about the message anymore.
552
553 =item Warning: Message-id '$msgid' does not contain a domain.
554
555 According to the RFCs, message-ids need to contain a unique random part,
556 then an C<@>, and then a domain name. This is made to avoid the creation
557 of two messages with the same id. The warning emerges when the C<@> is
558 missing from the string.
559
560 =item Warning: POP3 folders cannot be deleted.
561
562 Each user has only one POP3 folder on a server. This folder is created and
563 deleted by the server's administrator only.
564
565 =item Error: Package $package does not implement $method.
566
567 Fatal error: the specific package (or one of its superclasses) does not
568 implement this method where it should. This message means that some other
569 related classes do implement this method however the class at hand does
570 not. Probably you should investigate this and probably inform the author
571 of the package.
572
573 =item Error: Unable to create subfolder $name of $folder.
574
575 The copy includes the subfolders, but for some reason it was not possible
576 to copy one of these. Copying will proceed for all other sub-folders.
577
578 =item Error: Update of $nr messages ignored for POP3 folder $name.
579
580 The standard POP3 implementation does not support writing from client back
581 to the server. Therefore, modifications may be lost.
582
583 =item Error: Writing folder $name failed
584
585 For some reason (you probably got more error messages about this problem)
586 it is impossible to write the folder, although you should because there
587 were changes made.
588
589 =item Error: You cannot write a message to a pop server (yet)
590
591 Some extensions to the POP3 protocol do permit writing messages to the server,
592 but the standard protocol only implements retreival. Feel invited to extend our
593 implementation with writing.
594
595 =back
596
597 =head1 SEE ALSO
598
599 This module is part of Mail-Box-POP3 distribution version 3.005,
600 built on May 03, 2019. Website: F<http://perl.overmeer.net/CPAN/>
601
602 =head1 LICENSE
603
604 Copyrights 2001-2019 by [Mark Overmeer]. For other contributors see ChangeLog.
605
606 This program is free software; you can redistribute it and/or modify it
607 under the same terms as Perl itself.
608 See F<http://dev.perl.org/licenses/>
609
0 # Copyrights 2001-2019 by [Mark Overmeer].
1 # For other contributors see ChangeLog.
2 # See the manual pages for details on the licensing terms.
3 # Pod stripped from pm file by OODoc 2.02.
40 # This code is part of distribution Mail-Box-POP3. Meta-POD processed with
51 # OODoc into POD and HTML manual-pages. See README.md
62 # Copyright Mark Overmeer. Licensed under the same terms as Perl itself.
73
84 package Mail::Transport::POP3;
9 use vars '$VERSION';
10 $VERSION = '3.005';
11
125 use base 'Mail::Transport::Receive';
136
147 use strict;
1811 use Socket qw/$CRLF/;
1912 use Digest::MD5 qw/md5_hex/;
2013
14 =chapter NAME
15
16 Mail::Transport::POP3 - receive messages via POP3
17
18 =chapter SYNOPSIS
19
20 my $receiver = Mail::Transport::POP3->new(...);
21 my $message = $receiver->receive($id);
22
23 =chapter DESCRIPTION
24
25 Receive messages via the POP3 protocol from one remote server, as specified
26 in rfc1939. This object hides much of the complications in the protocol and
27 recovers broken connections automatically. Although it is part of the
28 MailBox distribution, this object can be used separately.
29
30 You probably should B<not use this> module, but M<Mail::Box::POP3>. This
31 module is the interface to POP3, whereas M<Mail::Box::POP3> hides the
32 protocol weirdness and works as any other mail folder.
33
34 =chapter METHODS
35
36 =c_method new %options
37
38 Create a new pop3 server connection. One object can only handle one
39 connection: for a single user to one single server. If the server
40 could not be reached, or when the login fails, this instantiating C<new>
41 will return C<undef>.
42
43 =default port C<110>
44
45 =option authenticate 'LOGIN'|'APOP'|'AUTO'
46 =default authenticate C<'AUTO'>
47
48 Authenthication method. The standard defines two methods, named LOGIN and
49 APOP. The first sends the username and password in plain text to the server
50 to get permission, the latter encrypts this data using MD5. When AUTO is
51 used, first APOP is tried, and then LOGIN.
52
53 =option use_ssl BOOLEAN
54 =default use_ssl <false>
55 To set the SSL parameters, use M<IO::Socket::SSL::set_defaults()>. Connections
56 will get restarted when they are lost: you have to keep the defaults in place
57 during POP actions.
58 =cut
2159
2260 sub _OK($) { substr(shift // '', 0, 3) eq '+OK' }
2361
3674 }
3775
3876 #------------------------------------------
77 =section Attributes
78
79 =method useSSL
80 Returns C<true> when SSL must be used.
81 =cut
3982
4083 sub useSSL() { shift->{MTP_ssl} }
4184
4285 #------------------------------------------
86 =section Receiving mail
87
88 =section Exchanging information
89
90 =method ids
91 Returns a list (in list context) or a reference to a list (in scalar context)
92 of all IDs which are known by the server on this moment.
93 =cut
4394
4495 sub ids(;@)
4596 { my $self = shift;
4798 wantarray ? @{$self->{MTP_n2uidl}} : $self->{MTP_n2uidl};
4899 }
49100
101 =method messages
102 Returns (in scalar context only) the number of messages that are known
103 to exist in the mailbox.
104
105 =error Cannot get the messages of pop3 via messages()
106 It is not possible to retrieve all messages on a remote POP3 folder
107 at once: each shall be taken separately. The POP3 folder will hide this
108 for you.
109
110 =cut
50111
51112 sub messages()
52113 { my $self = shift;
57118 $self->{MTP_messages};
58119 }
59120
121 =method folderSize
122 Returns the total number of octets used by the mailbox on the remote server.
123 =cut
60124
61125 sub folderSize() { shift->{MTP_folder_size} }
62126
127 =method header $id, [$bodylines]
128 Returns a reference to an array which contains the header of the message
129 with the specified $id. C<undef> is returned if something has gone wrong.
130
131 The optional integer $bodylines specifies the number of lines from the body
132 which should be added, by default none.
133
134 =example
135 my $ref_lines = $pop3->header($uidl);
136 print @$ref_lines;
137
138 =cut
63139
64140 sub header($;$)
65141 { my ($self, $uidl) = (shift, shift);
72148 $self->sendList($socket, "TOP $n $bodylines$CRLF");
73149 }
74150
151 =method message $id
152 Returns a reference to an array which contains the lines of the
153 message with the specified $id. Returns C<undef> if something has gone
154 wrong.
155
156 =example
157 my $ref_lines = $pop3->message($uidl);
158 print @$ref_lines;
159
160 =cut
75161
76162 sub message($;$)
77163 { my ($self, $uidl) = @_;
92178 $message;
93179 }
94180
181 =method messageSize $id
182 Returns the size of the message which is indicated by the $id, in octets.
183 If the message has been deleted on the remote server, this will return
184 C<undef>.
185 =cut
95186
96187 sub messageSize($)
97188 { my ($self, $uidl) = @_;
113204 $list->[$n];
114205 }
115206
207 =method deleted BOOLEAN, @ids
208 Either mark the specified message(s) to be deleted on the remote server or
209 unmark them for deletion (if the first parameter is false). Deletion of
210 messages will take place B<only> when the connection is specifically
211 disconnected or the last reference to the object goes out of scope.
212 =cut
116213
117214 sub deleted($@)
118215 { my $dele = shift->{MTP_dele} ||= {};
119216 (shift) ? @$dele{ @_ } = () : delete @$dele{ @_ };
120217 }
121218
219 =method deleteFetched
220 Mark all messages that have been fetched with M<message()> for deletion.
221 See M<fetched()>.
222 =cut
122223
123224 sub deleteFetched()
124225 { my $self = shift;
125226 $self->deleted(1, keys %{$self->{MTP_fetched}});
126227 }
127228
229 =method disconnect
230 Break contact with the server, if that (still) exists. Returns true if
231 successful. Please note that even if the disconnect was not successful,
232 all knowledge of messages etc. will be removed from the object: the object
233 basically has reverted to the state in which it was before anything was done
234 with the mail box.
235 =cut
128236
129237 sub disconnect()
130238 { my $self = shift;
155263 _OK $quit;
156264 }
157265
266 =method fetched
267 Returns a reference to a list of ID's that have been fetched using
268 M<message()>. This can be used to update a database of messages that
269 were fetched (but maybe not yet deleted) from the mailbox.
270
271 Please note that if the POP3 server did not support the UIDL command, this
272 method will always return undef because it is not possibly to reliably
273 identify messages between sessions (other than looking at the contents of
274 the messages themselves).
275
276 See also M<deleteFetched()>.
277 =cut
158278
159279 sub fetched(;$)
160280 { my $self = shift;
162282 $self->{MTP_fetched};
163283 }
164284
285 =method id2n $id
286 Translates the unique $id of a message into a sequence number which
287 represents the message as long a this connection to the POP3 server
288 exists. When the message has been deleted for some reason, C<undef>
289 is returned.
290 =cut
165291
166292 sub id2n($;$) { shift->{MTP_uidl2n}{shift()} }
167293
168294 #------------------------------------------
169295
296 =section Protocol internals
297
298 The follow methods handle protocol internals, and should not be used
299 by a normal user of this class.
300
301 =method socket
302 Returns a connection to the POP3 server. If there was no connection yet,
303 it will be created transparently. If the connection with the POP3 server
304 was lost, it will be reconnected and the assures that internal
305 state information (STAT and UIDL) is up-to-date in the object.
306
307 If the contact to the server was still present, or could be established,
308 an M<IO::Socket::INET> object is returned. Else, C<undef> is returned and
309 no further actions should be tried on the object.
310
311 =error Cannot re-connect reliably to server which doesn't support UIDL.
312 The connection to the remote POP3 was lost, and cannot be re-established
313 because the server's protocol implementation lacks the necessary information.
314
315 =cut
170316
171317 sub socket()
172318 { my $self = shift;
188334 }
189335
190336
337 =method send $socket, $data
338
339 Send $data to the indicated socket and return the first line read from
340 that socket. Logs an error if either writing to or reading from socket failed.
341
342 This method does B<not> attempt to reconnect or anything: if reading or
343 writing the socket fails, something is very definitely wrong.
344
345 =error Cannot read POP3 from socket: $!
346 It is not possible to read the success status of the previously given POP3
347 command. Connection lost?
348
349 =error Cannot write POP3 to socket: $@
350 It is not possible to send a protocol command to the POP3 server. Connection
351 lost?
352
353 =cut
191354
192355 sub send($$)
193356 { my $self = shift;
205368 $response;
206369 }
207370
371 =method sendList $socket, $command
372 Sends the indicated $command to the specified socket, and retrieves the
373 response. It returns a reference to an array with all the lines that
374 were reveived after the first C<+OK> line and before the end-of-message
375 delimiter (a single dot on a line). Returns C<undef>
376 whenever something has gone wrong.
377 =cut
208378
209379 sub sendList($$)
210380 { my ($self, $socket) = (shift, shift);
244414 }
245415
246416
417 =method login
418 Establish a new connection to the POP3 server, using username and password.
419
420 =error POP3 requires a username and password.
421 No username and/or no password specified for this POP3 folder, although
422 these are obligatory parts in the protocol.
423
424 =error Cannot connect to $host:$port for POP3: $!
425 Unsuccessful in connecting to the remote POP3 server.
426
427 =error Server at $host:$port does not seem to be talking POP3.
428 The remote server did not respond to an initial exchange of messages as is
429 expected by the POP3 protocol. The server has probably a different
430 service on the specified port.
431
432 =error Could not authenticate using any login method.
433 No authentication method was explicitly prescribed, so both AUTH and APOP were
434 tried. However, both failed. There are other authentication methods, which
435 are not defined by the main POP3 RFC rfc1939. These protocols are not
436 implemented yet. Please contribute your implementation.
437
438 =error Could not authenticate using '$some' method.
439
440 The authenication method to get access to the POP3 server did not result in
441 a connection. Maybe you need a different authentication protocol, or your
442 username with password are invalid.
443
444 =cut
247445
248446 sub login(;$)
249447 { my $self = shift;
312510 }
313511
314512
513 =method status $socket
514 Update the current status of folder on the remote POP3 server.
515
516 =error POP3 Could not do a STAT
517 For some weird reason, the server does not respond to the STAT call.
518 =cut
315519
316520 sub status($;$)
317521 { my ($self, $socket) = @_;
379583
380584 #------------------------------------------
381585
586 =section Server connection
587
588 =method url
589 Represent this pop3 connection as URL.
590 =cut
382591
383592 sub url(;$)
384593 { my $self = shift;
389598
390599 #------------------------------------------
391600
601 =section Error handling
602 =cut
392603
393604 1;
+0
-441
lib/Mail/Transport/POP3.pod less more
0 =encoding utf8
1
2 =head1 NAME
3
4 Mail::Transport::POP3 - receive messages via POP3
5
6 =head1 INHERITANCE
7
8 Mail::Transport::POP3
9 is a Mail::Transport::Receive
10 is a Mail::Transport
11 is a Mail::Reporter
12
13 =head1 SYNOPSIS
14
15 my $receiver = Mail::Transport::POP3->new(...);
16 my $message = $receiver->receive($id);
17
18 =head1 DESCRIPTION
19
20 Receive messages via the POP3 protocol from one remote server, as specified
21 in rfc1939. This object hides much of the complications in the protocol and
22 recovers broken connections automatically. Although it is part of the
23 MailBox distribution, this object can be used separately.
24
25 You probably should B<not use this> module, but L<Mail::Box::POP3|Mail::Box::POP3>. This
26 module is the interface to POP3, whereas L<Mail::Box::POP3|Mail::Box::POP3> hides the
27 protocol weirdness and works as any other mail folder.
28
29 Extends L<"DESCRIPTION" in Mail::Transport::Receive|Mail::Transport::Receive/"DESCRIPTION">.
30
31 =head1 METHODS
32
33 Extends L<"METHODS" in Mail::Transport::Receive|Mail::Transport::Receive/"METHODS">.
34
35 =head2 Constructors
36
37 Extends L<"Constructors" in Mail::Transport::Receive|Mail::Transport::Receive/"Constructors">.
38
39 =over 4
40
41 =item Mail::Transport::POP3-E<gt>B<new>(%options)
42
43 Create a new pop3 server connection. One object can only handle one
44 connection: for a single user to one single server. If the server
45 could not be reached, or when the login fails, this instantiating C<new>
46 will return C<undef>.
47
48 -Option --Defined in --Default
49 authenticate 'AUTO'
50 executable Mail::Transport undef
51 hostname Mail::Transport 'localhost'
52 interval Mail::Transport 30
53 log Mail::Reporter 'WARNINGS'
54 password Mail::Transport undef
55 port Mail::Transport 110
56 proxy Mail::Transport undef
57 retry Mail::Transport <false>
58 timeout Mail::Transport 120
59 trace Mail::Reporter 'WARNINGS'
60 use_ssl <false>
61 username Mail::Transport undef
62 via Mail::Transport 'sendmail'
63
64 =over 2
65
66 =item authenticate => 'LOGIN'|'APOP'|'AUTO'
67
68 Authenthication method. The standard defines two methods, named LOGIN and
69 APOP. The first sends the username and password in plain text to the server
70 to get permission, the latter encrypts this data using MD5. When AUTO is
71 used, first APOP is tried, and then LOGIN.
72
73 =item executable => FILENAME
74
75 =item hostname => HOSTNAME|ARRAY
76
77 =item interval => SECONDS
78
79 =item log => LEVEL
80
81 =item password => STRING
82
83 =item port => INTEGER
84
85 =item proxy => PATH
86
87 =item retry => NUMBER|undef
88
89 =item timeout => SECONDS
90
91 =item trace => LEVEL
92
93 =item use_ssl => BOOLEAN
94
95 To set the SSL parameters, use IO::Socket::SSL subroutine set_defaults. Connections
96 will get restarted when they are lost: you have to keep the defaults in place
97 during POP actions.
98
99 =item username => STRING
100
101 =item via => CLASS|NAME
102
103 =back
104
105 =back
106
107 =head2 Attributes
108
109 =over 4
110
111 =item $obj-E<gt>B<useSSL>()
112
113 Returns C<true> when SSL must be used.
114
115 =back
116
117 =head2 Receiving mail
118
119 Extends L<"Receiving mail" in Mail::Transport::Receive|Mail::Transport::Receive/"Receiving mail">.
120
121 =over 4
122
123 =item $obj-E<gt>B<receive>( [$unique_message_id] )
124
125 Inherited, see L<Mail::Transport::Receive/"Receiving mail">
126
127 =back
128
129 =head2 Exchanging information
130
131 =over 4
132
133 =item $obj-E<gt>B<deleteFetched>()
134
135 Mark all messages that have been fetched with L<message()|Mail::Transport::POP3/"Exchanging information"> for deletion.
136 See L<fetched()|Mail::Transport::POP3/"Exchanging information">.
137
138 =item $obj-E<gt>B<deleted>(BOOLEAN, @ids)
139
140 Either mark the specified message(s) to be deleted on the remote server or
141 unmark them for deletion (if the first parameter is false). Deletion of
142 messages will take place B<only> when the connection is specifically
143 disconnected or the last reference to the object goes out of scope.
144
145 =item $obj-E<gt>B<disconnect>()
146
147 Break contact with the server, if that (still) exists. Returns true if
148 successful. Please note that even if the disconnect was not successful,
149 all knowledge of messages etc. will be removed from the object: the object
150 basically has reverted to the state in which it was before anything was done
151 with the mail box.
152
153 =item $obj-E<gt>B<fetched>()
154
155 Returns a reference to a list of ID's that have been fetched using
156 L<message()|Mail::Transport::POP3/"Exchanging information">. This can be used to update a database of messages that
157 were fetched (but maybe not yet deleted) from the mailbox.
158
159 Please note that if the POP3 server did not support the UIDL command, this
160 method will always return undef because it is not possibly to reliably
161 identify messages between sessions (other than looking at the contents of
162 the messages themselves).
163
164 See also L<deleteFetched()|Mail::Transport::POP3/"Exchanging information">.
165
166 =item $obj-E<gt>B<folderSize>()
167
168 Returns the total number of octets used by the mailbox on the remote server.
169
170 =item $obj-E<gt>B<header>( $id, [$bodylines] )
171
172 Returns a reference to an array which contains the header of the message
173 with the specified $id. C<undef> is returned if something has gone wrong.
174
175 The optional integer $bodylines specifies the number of lines from the body
176 which should be added, by default none.
177
178 example:
179
180 my $ref_lines = $pop3->header($uidl);
181 print @$ref_lines;
182
183 =item $obj-E<gt>B<id2n>($id)
184
185 Translates the unique $id of a message into a sequence number which
186 represents the message as long a this connection to the POP3 server
187 exists. When the message has been deleted for some reason, C<undef>
188 is returned.
189
190 =item $obj-E<gt>B<ids>()
191
192 Returns a list (in list context) or a reference to a list (in scalar context)
193 of all IDs which are known by the server on this moment.
194
195 =item $obj-E<gt>B<message>($id)
196
197 Returns a reference to an array which contains the lines of the
198 message with the specified $id. Returns C<undef> if something has gone
199 wrong.
200
201 example:
202
203 my $ref_lines = $pop3->message($uidl);
204 print @$ref_lines;
205
206 =item $obj-E<gt>B<messageSize>($id)
207
208 Returns the size of the message which is indicated by the $id, in octets.
209 If the message has been deleted on the remote server, this will return
210 C<undef>.
211
212 =item $obj-E<gt>B<messages>()
213
214 Returns (in scalar context only) the number of messages that are known
215 to exist in the mailbox.
216
217 =back
218
219 =head2 Protocol internals
220
221 The follow methods handle protocol internals, and should not be used
222 by a normal user of this class.
223
224 =over 4
225
226 =item $obj-E<gt>B<login>()
227
228 Establish a new connection to the POP3 server, using username and password.
229
230 =item $obj-E<gt>B<send>($socket, $data)
231
232 Send $data to the indicated socket and return the first line read from
233 that socket. Logs an error if either writing to or reading from socket failed.
234
235 This method does B<not> attempt to reconnect or anything: if reading or
236 writing the socket fails, something is very definitely wrong.
237
238 =item $obj-E<gt>B<sendList>($socket, $command)
239
240 Sends the indicated $command to the specified socket, and retrieves the
241 response. It returns a reference to an array with all the lines that
242 were reveived after the first C<+OK> line and before the end-of-message
243 delimiter (a single dot on a line). Returns C<undef>
244 whenever something has gone wrong.
245
246 =item $obj-E<gt>B<socket>()
247
248 Returns a connection to the POP3 server. If there was no connection yet,
249 it will be created transparently. If the connection with the POP3 server
250 was lost, it will be reconnected and the assures that internal
251 state information (STAT and UIDL) is up-to-date in the object.
252
253 If the contact to the server was still present, or could be established,
254 an IO::Socket::INET object is returned. Else, C<undef> is returned and
255 no further actions should be tried on the object.
256
257 =item $obj-E<gt>B<status>($socket)
258
259 Update the current status of folder on the remote POP3 server.
260
261 =back
262
263 =head2 Server connection
264
265 Extends L<"Server connection" in Mail::Transport::Receive|Mail::Transport::Receive/"Server connection">.
266
267 =over 4
268
269 =item $obj-E<gt>B<findBinary>( $name, [@directories] )
270
271 Inherited, see L<Mail::Transport/"Server connection">
272
273 =item $obj-E<gt>B<remoteHost>()
274
275 Inherited, see L<Mail::Transport/"Server connection">
276
277 =item $obj-E<gt>B<retry>()
278
279 Inherited, see L<Mail::Transport/"Server connection">
280
281 =item $obj-E<gt>B<url>()
282
283 Represent this pop3 connection as URL.
284
285 =back
286
287 =head2 Error handling
288
289 Extends L<"Error handling" in Mail::Transport::Receive|Mail::Transport::Receive/"Error handling">.
290
291 =over 4
292
293 =item $obj-E<gt>B<AUTOLOAD>()
294
295 Inherited, see L<Mail::Reporter/"Error handling">
296
297 =item $obj-E<gt>B<addReport>($object)
298
299 Inherited, see L<Mail::Reporter/"Error handling">
300
301 =item $obj-E<gt>B<defaultTrace>( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
302
303 =item Mail::Transport::POP3-E<gt>B<defaultTrace>( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
304
305 Inherited, see L<Mail::Reporter/"Error handling">
306
307 =item $obj-E<gt>B<errors>()
308
309 Inherited, see L<Mail::Reporter/"Error handling">
310
311 =item $obj-E<gt>B<log>( [$level, [$strings]] )
312
313 =item Mail::Transport::POP3-E<gt>B<log>( [$level, [$strings]] )
314
315 Inherited, see L<Mail::Reporter/"Error handling">
316
317 =item $obj-E<gt>B<logPriority>($level)
318
319 =item Mail::Transport::POP3-E<gt>B<logPriority>($level)
320
321 Inherited, see L<Mail::Reporter/"Error handling">
322
323 =item $obj-E<gt>B<logSettings>()
324
325 Inherited, see L<Mail::Reporter/"Error handling">
326
327 =item $obj-E<gt>B<notImplemented>()
328
329 Inherited, see L<Mail::Reporter/"Error handling">
330
331 =item $obj-E<gt>B<report>( [$level] )
332
333 Inherited, see L<Mail::Reporter/"Error handling">
334
335 =item $obj-E<gt>B<reportAll>( [$level] )
336
337 Inherited, see L<Mail::Reporter/"Error handling">
338
339 =item $obj-E<gt>B<trace>( [$level] )
340
341 Inherited, see L<Mail::Reporter/"Error handling">
342
343 =item $obj-E<gt>B<warnings>()
344
345 Inherited, see L<Mail::Reporter/"Error handling">
346
347 =back
348
349 =head2 Cleanup
350
351 Extends L<"Cleanup" in Mail::Transport::Receive|Mail::Transport::Receive/"Cleanup">.
352
353 =over 4
354
355 =item $obj-E<gt>B<DESTROY>()
356
357 Inherited, see L<Mail::Reporter/"Cleanup">
358
359 =back
360
361 =head1 DIAGNOSTICS
362
363 =over 4
364
365 =item Error: Cannot connect to $host:$port for POP3: $!
366
367 Unsuccessful in connecting to the remote POP3 server.
368
369 =item Error: Cannot get the messages of pop3 via messages()
370
371 It is not possible to retrieve all messages on a remote POP3 folder
372 at once: each shall be taken separately. The POP3 folder will hide this
373 for you.
374
375 =item Error: Cannot re-connect reliably to server which doesn't support UIDL.
376
377 The connection to the remote POP3 was lost, and cannot be re-established
378 because the server's protocol implementation lacks the necessary information.
379
380 =item Error: Cannot read POP3 from socket: $!
381
382 It is not possible to read the success status of the previously given POP3
383 command. Connection lost?
384
385 =item Error: Cannot write POP3 to socket: $@
386
387 It is not possible to send a protocol command to the POP3 server. Connection
388 lost?
389
390 =item Error: Could not authenticate using '$some' method.
391
392 The authenication method to get access to the POP3 server did not result in
393 a connection. Maybe you need a different authentication protocol, or your
394 username with password are invalid.
395
396 =item Error: Could not authenticate using any login method.
397
398 No authentication method was explicitly prescribed, so both AUTH and APOP were
399 tried. However, both failed. There are other authentication methods, which
400 are not defined by the main POP3 RFC rfc1939. These protocols are not
401 implemented yet. Please contribute your implementation.
402
403 =item Error: POP3 Could not do a STAT
404
405 For some weird reason, the server does not respond to the STAT call.
406
407 =item Error: POP3 requires a username and password.
408
409 No username and/or no password specified for this POP3 folder, although
410 these are obligatory parts in the protocol.
411
412 =item Error: Package $package does not implement $method.
413
414 Fatal error: the specific package (or one of its superclasses) does not
415 implement this method where it should. This message means that some other
416 related classes do implement this method however the class at hand does
417 not. Probably you should investigate this and probably inform the author
418 of the package.
419
420 =item Error: Server at $host:$port does not seem to be talking POP3.
421
422 The remote server did not respond to an initial exchange of messages as is
423 expected by the POP3 protocol. The server has probably a different
424 service on the specified port.
425
426 =back
427
428 =head1 SEE ALSO
429
430 This module is part of Mail-Box-POP3 distribution version 3.005,
431 built on May 03, 2019. Website: F<http://perl.overmeer.net/CPAN/>
432
433 =head1 LICENSE
434
435 Copyrights 2001-2019 by [Mark Overmeer]. For other contributors see ChangeLog.
436
437 This program is free software; you can redistribute it and/or modify it
438 under the same terms as Perl itself.
439 See F<http://dev.perl.org/licenses/>
440
(No changes)
(No changes)
(No changes)
(No changes)
(No changes)
(No changes)