Sisima...aildir(3pm)

✨ NAME ✨

Sisimai::Mail::Maildir β€” the Mailbox reader πŸ’Œ (it's from the User Contributed Perl Documentation, so you know it's the community's little gift to you, and the page header up top is the truncated Sisima...aildir(3pm) situation, we love a mysterious queen)


🌈 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. That's it, that's the job. Specifically, it goes and grabs the contents of each email chilling inside a Maildir/ directory, one by one, no drama, no mess. Straightforward. Iconic. πŸ’…


πŸ‘‘ CLASS METHODS πŸ‘‘

πŸ’– new(path to Maildir/)

The new() method is the constructor of Sisimai::Mail::Maildir β€” like, it's how you make one. You hand it a path and it wakes up. 🫢

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

πŸŽ€ INSTANCE METHODS πŸŽ€

πŸ“ dir()

The dir() method gives you back the path to the Maildir/ β€” the whole folder, periodt.

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

🌸 path()

The path() method returns the path to each individual email in the Maildir/ β€” so, the one specific mail, not the whole vibe of the directory. Very specific of it, we love that. ✨

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

🧚 file()

The file() method returns the current file name of the Maildir. Just the name, bestie. πŸ‘‘

print $maildir->file;

πŸ”₯ size()

The size() method returns the amount of email size which has been read β€” yes, the amount of email size, that's the wording, and honestly it ate. πŸ’€

print $maildir->size;

πŸ’œ offset()

The offset() method returns the number of emails which have been read in the Maildir/. A little counter for your little readings. πŸŽ€

$maildir->offset;   # 2

🌈 handle()

The handle() meethod returns file handle object IO::Dir of the Maildir. (And yes, it literally says "meethod" in the original β€” not me, I would never. It's iconic, we keep it, no cap. πŸ’–)

$maildir->handle->close;

⭐ read()

The read() method is the iterator β€” it does the whole "read each email in the Maildir/" thing, one at a time, so you can loop over your mail like a main character. 🌸

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 β€” the legend themselves 🫢

Copyright (C) 2014-2016,2018-2021,2024,2025 azumakuniyuki, All rights reserved.

🌟 LICENSE 🌟

This software is distributed under The BSD 2-Clause License. Slay, legally speaking. πŸ’…


okay bestie that's the whole page β€” this one's perl v5.40.1, dated 2026-07-05, and it's the Sisima...aildir(3pm) manual from the User Contributed Perl Documentation. go read your mail βœ¨πŸ¦‹πŸ’–

πŸ“¦ where this page comes from