1Mail::Box::IMAP4s(3)  User Contributed Perl Documentation Mail::Box::IMAP4s(3)
2
3
4

NAME

6       Mail::Box::IMAP4s - handle IMAP4 folders as client, with ssl connection
7

INHERITANCE

9        Mail::Box::IMAP4s
10          is a Mail::Box::IMAP4
11          is a Mail::Box::Net
12          is a Mail::Box
13          is a Mail::Reporter
14

SYNOPSIS

16        my $url = 'imap4s://user:passwd@host:port/INBOX';
17        my $url = 'imaps://user:passwd@host:port/INBOX';
18
19        use Mail::Box::IMAP4s;
20        my $folder = Mail::Box::IMAP4s->new(folder => $url, ...);
21
22        my $mgr    = Mail::Box::Manager->new;
23        my $folder = $msg->open($url, retry => 3, interval => 5);
24

DESCRIPTION

26       See Mail::Box::IMAP4.
27
28       Extends "DESCRIPTION" in Mail::Box::IMAP4.
29

OVERLOADED

31       Extends "OVERLOADED" in Mail::Box::IMAP4.
32
33       overload: ""
34           Inherited, see "OVERLOADED" in Mail::Box
35
36       overload: @{}
37           Inherited, see "OVERLOADED" in Mail::Box
38
39       overload: cmp
40           Inherited, see "OVERLOADED" in Mail::Box
41

METHODS

43       Extends "METHODS" in Mail::Box::IMAP4.
44
45   Constructors
46       Extends "Constructors" in Mail::Box::IMAP4.
47
48       Mail::Box::IMAP4s->new(%options)
49            -Option           --Defined in      --Default
50             access             Mail::Box         'r'
51             body_delayed_type  Mail::Box         Mail::Message::Body::Delayed
52             body_type          Mail::Box         Mail::Message::Body::Lines
53             cache_body         Mail::Box::IMAP4  NO
54             cache_head         Mail::Box::IMAP4  NO or DELAY
55             cache_labels       Mail::Box::IMAP4  NO or DELAY
56             coerce_options     Mail::Box         []
57             create             Mail::Box         <false>
58             extract            Mail::Box         10240
59             field_type         Mail::Box         undef
60             fix_headers        Mail::Box         <false>
61             folder             Mail::Box         /
62             folderdir          Mail::Box         <network location>
63             head_delayed_type  Mail::Box         Mail::Message::Head::Delayed
64             head_type          Mail::Box         Mail::Box::IMAP4::Head or Mail::Message::Head::Complete
65             join_connection    Mail::Box::IMAP4  true
66             keep_dups          Mail::Box         <false>
67             lock_file          Mail::Box         undef
68             lock_timeout       Mail::Box         1 hour
69             lock_type          Mail::Box         'NONE'
70             lock_wait          Mail::Box         10 seconds
71             locker             Mail::Box         undef
72             log                Mail::Reporter    'WARNINGS'
73             manager            Mail::Box         undef
74             message_type       Mail::Box         Mail::Box::IMAP4::Message
75             multipart_type     Mail::Box         Mail::Message::Body::Multipart
76             password           Mail::Box::Net    undef
77             remove_when_empty  Mail::Box         <false>
78             save_on_exit       Mail::Box         <true>
79             server_name        Mail::Box::Net    undef
80             server_port        Mail::Box::Net    993
81             ssl                                  { SSL_verify_mode => SSL_VERIFY_NONE }
82             trace              Mail::Reporter    'WARNINGS'
83             transporter        Mail::Box::IMAP4  Mail::Transport::IMAP4
84             trusted            Mail::Box         <false>
85             username           Mail::Box::Net    undef
86
87           access => MODE
88           body_delayed_type => CLASS
89           body_type => CLASS|CODE
90           cache_body => 'NO'|'YES'|'DELAY'
91           cache_head => 'NO'|'PARTIAL'|'DELAY'
92           cache_labels => 'NO'|'WRITE'|'DELAY'
93           coerce_options => ARRAY
94           create => BOOLEAN
95           extract => INTEGER | CODE | METHOD | 'LAZY'|'ALWAYS'
96           field_type => CLASS
97           fix_headers => BOOLEAN
98           folder => FOLDERNAME
99           folderdir => DIRECTORY
100           head_delayed_type => CLASS
101           head_type => CLASS
102           join_connection => BOOLEAN
103           keep_dups => BOOLEAN
104           lock_file => FILENAME
105           lock_timeout => SECONDS
106           lock_type => CLASS|STRING|ARRAY
107           lock_wait => SECONDS
108           locker => OBJECT
109           log => LEVEL
110           manager => MANAGER
111           message_type => CLASS
112           multipart_type => CLASS
113           password => STRING
114           remove_when_empty => BOOLEAN
115           save_on_exit => BOOLEAN
116           server_name => HOSTNAME
117           server_port => INTEGER
118           ssl => HASH|ARRAY
119             Parameters to initialize the SSL connection.
120
121           trace => LEVEL
122           transporter => OBJECT|CLASS
123           trusted => BOOLEAN
124           username => STRING
125
126   The folder
127       Extends "The folder" in Mail::Box::IMAP4.
128
129       $obj->addMessage($message, %options)
130           Inherited, see "The folder" in Mail::Box
131
132       $obj->addMessages(@messages)
133           Inherited, see "The folder" in Mail::Box
134
135       Mail::Box::IMAP4s->appendMessages(%options)
136           Inherited, see "The folder" in Mail::Box
137
138       $obj->close(%options)
139           Inherited, see "METHODS" in Mail::Box::IMAP4
140
141       $obj->copyTo($folder, %options)
142           Inherited, see "The folder" in Mail::Box
143
144       $obj->delete(%options)
145           Inherited, see "The folder" in Mail::Box
146
147       $obj->folderdir( [$directory] )
148           Inherited, see "The folder" in Mail::Box
149
150       $obj->name()
151           Inherited, see "The folder" in Mail::Box
152
153       $obj->organization()
154           Inherited, see "The folder" in Mail::Box
155
156       $obj->size()
157           Inherited, see "The folder" in Mail::Box
158
159       $obj->type()
160           Inherited, see "The folder" in Mail::Box
161
162       $obj->update(%options)
163           Inherited, see "The folder" in Mail::Box
164
165       $obj->url()
166           Inherited, see "The folder" in Mail::Box
167
168   Folder flags
169       Extends "Folder flags" in Mail::Box::IMAP4.
170
171       $obj->access()
172           Inherited, see "Folder flags" in Mail::Box
173
174       $obj->isModified()
175           Inherited, see "Folder flags" in Mail::Box
176
177       $obj->modified( [BOOLEAN] )
178           Inherited, see "Folder flags" in Mail::Box
179
180       $obj->writable()
181           Inherited, see "Folder flags" in Mail::Box
182
183   The messages
184       Extends "The messages" in Mail::Box::IMAP4.
185
186       $obj->current( [$number|$message|$message_id] )
187           Inherited, see "The messages" in Mail::Box
188
189       $obj->find($message_id)
190           Inherited, see "The messages" in Mail::Box
191
192       $obj->findFirstLabeled( $label, [BOOLEAN, [$msgs]] )
193           Inherited, see "The messages" in Mail::Box
194
195       $obj->message( $index, [$message] )
196           Inherited, see "The messages" in Mail::Box
197
198       $obj->messageId( $message_id, [$message] )
199           Inherited, see "The messages" in Mail::Box
200
201       $obj->messageIds()
202           Inherited, see "The messages" in Mail::Box
203
204       $obj->messages( <'ALL'|$range|'ACTIVE'|'DELETED'|$label|
205       !$label|$filter> )
206           Inherited, see "The messages" in Mail::Box
207
208       $obj->nrMessages(%options)
209           Inherited, see "The messages" in Mail::Box
210
211       $obj->scanForMessages($message, $message_ids, $timespan, $window)
212           Inherited, see "The messages" in Mail::Box
213
214   Sub-folders
215       Extends "Sub-folders" in Mail::Box::IMAP4.
216
217       $obj->listSubFolders(%options)
218       Mail::Box::IMAP4s->listSubFolders(%options)
219           Inherited, see "Sub-folders" in Mail::Box
220
221       $obj->nameOfSubFolder( $subname, [$parentname] )
222       Mail::Box::IMAP4s->nameOfSubFolder( $subname, [$parentname] )
223           Inherited, see "Sub-folders" in Mail::Box
224
225       $obj->openRelatedFolder(%options)
226           Inherited, see "Sub-folders" in Mail::Box
227
228       $obj->openSubFolder($subname, %options)
229           Inherited, see "Sub-folders" in Mail::Box
230
231       $obj->topFolderWithMessages()
232       Mail::Box::IMAP4s->topFolderWithMessages()
233           Inherited, see "Sub-folders" in Mail::Box
234
235   Internals
236       Extends "Internals" in Mail::Box::IMAP4.
237
238       $obj->body( [$body] )
239           Inherited, see "Internals" in Mail::Box::IMAP4
240
241       $obj->coerce($message, %options)
242           Inherited, see "Internals" in Mail::Box
243
244       $obj->create($folder, %options)
245       Mail::Box::IMAP4s->create($folder, %options)
246           Inherited, see "METHODS" in Mail::Box::Net
247
248       $obj->createTransporter($class, %options)
249           Inherited, see "Internals" in Mail::Box::IMAP4
250
251       $obj->determineBodyType($message, $head)
252           Inherited, see "Internals" in Mail::Box
253
254       $obj->fetch( <$messages|$selection>, $info )
255           Inherited, see "Internals" in Mail::Box::IMAP4
256
257       Mail::Box::IMAP4s->foundIn( [$foldername], %options )
258           Inherited, see "Internals" in Mail::Box
259
260       $obj->getHead($message)
261           Inherited, see "Internals" in Mail::Box::IMAP4
262
263       $obj->getHeadAndBody($message)
264           Inherited, see "Internals" in Mail::Box::IMAP4
265
266       $obj->lineSeparator( [<STRING|'CR'|'LF'|'CRLF'>] )
267           Inherited, see "Internals" in Mail::Box
268
269       $obj->locker()
270           Inherited, see "Internals" in Mail::Box
271
272       $obj->read(%options)
273           Inherited, see "Internals" in Mail::Box
274
275       $obj->readMessages(%options)
276           Inherited, see "Internals" in Mail::Box
277
278       $obj->storeMessage($message)
279           Inherited, see "Internals" in Mail::Box
280
281       $obj->toBeThreaded($messages)
282           Inherited, see "Internals" in Mail::Box
283
284       $obj->toBeUnthreaded($messages)
285           Inherited, see "Internals" in Mail::Box
286
287       $obj->transporter( [$object] )
288           Inherited, see "Internals" in Mail::Box::IMAP4
289
290       $obj->updateMessages(%options)
291           Inherited, see "Internals" in Mail::Box
292
293       $obj->write(%options)
294           Inherited, see "Internals" in Mail::Box::IMAP4
295
296       $obj->writeMessages(%options)
297           Inherited, see "Internals" in Mail::Box::IMAP4
298
299   Other methods
300       Extends "Other methods" in Mail::Box::IMAP4.
301
302       $obj->timespan2seconds($time)
303       Mail::Box::IMAP4s->timespan2seconds($time)
304           Inherited, see "Other methods" in Mail::Box
305
306   Error handling
307       Extends "Error handling" in Mail::Box::IMAP4.
308
309       $obj->AUTOLOAD()
310           Inherited, see "Error handling" in Mail::Reporter
311
312       $obj->addReport($object)
313           Inherited, see "Error handling" in Mail::Reporter
314
315       $obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,
316       $callback] )
317       Mail::Box::IMAP4s->defaultTrace( [$level]|[$loglevel,
318       $tracelevel]|[$level, $callback] )
319           Inherited, see "Error handling" in Mail::Reporter
320
321       $obj->errors()
322           Inherited, see "Error handling" in Mail::Reporter
323
324       $obj->log( [$level, [$strings]] )
325       Mail::Box::IMAP4s->log( [$level, [$strings]] )
326           Inherited, see "Error handling" in Mail::Reporter
327
328       $obj->logPriority($level)
329       Mail::Box::IMAP4s->logPriority($level)
330           Inherited, see "Error handling" in Mail::Reporter
331
332       $obj->logSettings()
333           Inherited, see "Error handling" in Mail::Reporter
334
335       $obj->notImplemented()
336           Inherited, see "Error handling" in Mail::Reporter
337
338       $obj->report( [$level] )
339           Inherited, see "Error handling" in Mail::Reporter
340
341       $obj->reportAll( [$level] )
342           Inherited, see "Error handling" in Mail::Reporter
343
344       $obj->trace( [$level] )
345           Inherited, see "Error handling" in Mail::Reporter
346
347       $obj->warnings()
348           Inherited, see "Error handling" in Mail::Reporter
349
350   Cleanup
351       Extends "Cleanup" in Mail::Box::IMAP4.
352
353       $obj->DESTROY()
354           Inherited, see "Cleanup" in Mail::Box
355

DETAILS

357       Extends "DETAILS" in Mail::Box::IMAP4.
358

DIAGNOSTICS

360       Warning: Cannot find head back for $uidl in $folder.
361           The header was read before, but now seems empty: the IMAP4 server
362           does not produce the header lines anymore.
363
364       Warning: Cannot read body for $uidl in $folder.
365           The header of the message was retrieved from the IMAP4 server, but
366           the body is not read, for an unknown reason.
367
368       Error: Copying failed for one message.
369           For some reason, for instance disc full, removed by external
370           process, or read-protection, it is impossible to copy one of the
371           messages.  Copying will proceed for the other messages.
372
373       Error: Couldn't select IMAP4 folder $name
374       Error: Destination folder $name is not writable.
375           The folder where the messages are copied to is not opened with
376           write access (see new(access)).  This has no relation with write
377           permission to the folder which is controlled by your operating
378           system.
379
380       Warning: Different messages with id $msgid
381           The message id is discovered more than once within the same folder,
382           but the content of the message seems to be different.  This should
383           not be possible: each message must be unique.
384
385       Error: Folder $name not deleted: not writable.
386           The folder must be opened with write access via new(access),
387           otherwise removing it will be refused.  So, you may have write-
388           access according to the operating system, but that will not
389           automatically mean that this "delete" method permits you to.  The
390           reverse remark is valid as well.
391
392       Notice: Impossible to keep deleted messages in IMAP
393           Some folder type have a 'deleted' flag which can be stored in the
394           folder to be performed later.  The folder keeps that knowledge even
395           when the folder is rewritten.  Well, IMAP4 cannot play that trick.
396
397       Error: Invalid timespan '$timespan' specified.
398           The string does not follow the strict rules of the time span syntax
399           which is permitted as parameter.
400
401       Warning: Message $uidl disappeared from $folder.
402           Trying to get the specific message from the server, but it appears
403           to be gone.
404
405       Warning: Message $uidl disappeared from $folder.
406           Trying to get the specific message from the server, but it appears
407           to be gone.
408
409       Warning: Message-id '$msgid' does not contain a domain.
410           According to the RFCs, message-ids need to contain a unique random
411           part, then an "@", and then a domain name.  This is made to avoid
412           the creation of two messages with the same id.  The warning emerges
413           when the "@" is missing from the string.
414
415       Error: No IMAP4 transporter configured
416       Error: Package $package does not implement $method.
417           Fatal error: the specific package (or one of its superclasses) does
418           not implement this method where it should. This message means that
419           some other related classes do implement this method however the
420           class at hand does not.  Probably you should investigate this and
421           probably inform the author of the package.
422
423       Error: Unable to create subfolder $name of $folder.
424           The copy includes the subfolders, but for some reason it was not
425           possible to copy one of these.  Copying will proceed for all other
426           sub-folders.
427

SEE ALSO

429       This module is part of Mail-Box-IMAP4 distribution version 3.007, built
430       on June 13, 2019. Website: http://perl.overmeer.net/CPAN/
431

LICENSE

433       Copyrights 2001-2019 by [Mark Overmeer]. For other contributors see
434       ChangeLog.
435
436       This program is free software; you can redistribute it and/or modify it
437       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
438
439
440
441perl v5.36.0                      2023-01-20              Mail::Box::IMAP4s(3)
Impressum