Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Sisimai::Mail::MaildirUser Contributed Perl DocumentaSisimai::Mail::Maildir(3)

NAME
       Sisimai::Mail::Maildir -	Mailbox	reader

SYNOPSIS
	   use Sisimai::Mail::Maildir;
	   my $maildir = Sisimai::Mail::Maildir->new('/home/neko/Maildir/new');
	   while( my $r	= $maildir->read ) {
	       print $r;   # print contents of the mail	in the Maildir/
	   }

DESCRIPTION
       Sisimai::Mail::Maildir is a reader for getting contents of each email
       in the Maildir/ directory.

CLASS METHODS
   "new(path to	Maildir/)"
       "new()" is a constructor	of Sisimai::Mail::Maildir

	   my $maildir = Sisimai::Mail::Maildir->new('/home/neko/Maildir/new');

INSTANCE METHODS
   "dir()"
       "dir()" returns the path	to Maildir/

	   print $maildir->dir;	  # /home/neko/Maildir/new/

   "path()"
       "path()"	returns	the path to each email in Maildir/

	   print $maildir->path;   # /home/neko/Maildir/new/1.eml

   "file()"
       "file()"	returns	current	file name of the Maildir.

	   print $maildir->file;

   "size()"
       "size()"	returns	the amount of email size which has been	read

	   print $maildir->size;

   "offset()"
       "offset()" returns the number of	emails which have been read in
       Maildir/

	   $maildir->offset;   # 2

   "handle()"
       "handle()" returns file handle object (IO::Dir) of the Maildir.

	   $maildir->handle->close;

   "read()"
       "read()"	works as a iterator for	reading	each email in the Maildir.

	   my $maildir = Sisimai::Mail->new('/home/neko/Maildir/new');
	   while( my $r	= $mailbox->read ) {
	       print $r;   # print each	email in /home/neko/Maildir/new
	   }

AUTHOR
       azumakuniyuki

COPYRIGHT
       Copyright (C) 2014-2016,2018-2020 azumakuniyuki,	All rights reserved.

LICENSE
       This software is	distributed under The BSD 2-Clause License.

perl v5.32.0			  2020-07-17	     Sisimai::Mail::Maildir(3)

NAME | SYNOPSIS | DESCRIPTION | CLASS METHODS | INSTANCE METHODS | AUTHOR | COPYRIGHT | LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Sisimai::Mail::Maildir&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help