Name
new
Synopsis
$folder
= new(ftype
[,foldername
][,options
])
Creates a new Mail::Folder object of the specified type. Arguments are:
ftype
The type of folder. Possible values are
mbox
,maildir
,emaul
, orNNTP
.foldername
The name of the folder. If present, the
open
method is called withfoldername
as the argument.options
A hash in which the following options may be the keys:
Content-Length
Content-length
header is created or updated byappend_message
andupdate_message
.Create
If set, the folder is created if it doesn’t already exist.
DefaultFolderType
Autodetects folder type if
create
option is set andAUTODETECT
has been set.DotLock
Uses .lock-style folder locking with the proper folder interface (currently used only with the mbox interface).
Flock
Uses
flock
-style folder locking with the proper folder interface (currently used only with the mbox interface).NFSLock
Deals with NFS-style file locking with the proper folder interface and the NFS server in question.
notMUA
If set, makes updates but doesn’t save message labels or the current message indicator. If not set (the default), saves labels and the current message indicator as appropriate for the folder interface.
Timeout
Overrides the default timeout value. Specified in seconds. Particularly useful for folder interfaces that involve network communications.
Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.