GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Sisimai::Mail::Maildir(3) User Contributed Perl Documentation Sisimai::Mail::Maildir(3)

Sisimai::Mail::Maildir - Mailbox reader

    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/
    }

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

"new()" is a constructor of Sisimai::Mail::Maildir

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

"dir()" returns the path to Maildir/

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

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

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

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

    print $maildir->file;

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

    print $maildir->size;

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

    $maildir->offset;   # 2

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

    $maildir->handle->close;

"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
    }

azumakuniyuki

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

This software is distributed under The BSD 2-Clause License.
2021-02-22 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.