.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "CiderWebmail::Model::IMAPClient 3pm" .TH CiderWebmail::Model::IMAPClient 3pm "2023-08-13" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" CiderWebmail::Model::IMAPClient \- Catalyst Model .SH "DESCRIPTION" .IX Header "DESCRIPTION" Interface to the \s-1IMAP\s0 Server .PP You should *really* read rfc3501 if you want to use this. .SH "METHODS" .IX Header "METHODS" .SS "\fBnew()\fP" .IX Subsection "new()" creates a new CiderWebmail::Model::IMAPClient .SS "\fB_die_on_error()\fP" .IX Subsection "_die_on_error()" die if the last \s-1IMAP\s0 command sent to the server caused an error this sould be called after every command sent to the imap server. .SS "disconnect" .IX Subsection "disconnect" disconnect from \s-1IMAP\s0 Server, if connected .SS "\fBseparator()\fP" .IX Subsection "separator()" Returnes the folder separator .SS "\fBfolder_tree()\fP" .IX Subsection "folder_tree()" Return all folders as hash-tree. .SS "folder_sort" .IX Subsection "folder_sort" custom sort for folders always put \s-1INBOX\s0 on top .ie n .SS "select({ mailbox => $mailbox })" .el .SS "select({ mailbox => \f(CW$mailbox\fP })" .IX Subsection "select({ mailbox => $mailbox })" selects a folder .ie n .SS "message_count({ mailbox => $mailbox })" .el .SS "message_count({ mailbox => \f(CW$mailbox\fP })" .IX Subsection "message_count({ mailbox => $mailbox })" returnes the number of messages in a mailbox .ie n .SS "unseen_count({ mailbox => $mailbox })" .el .SS "unseen_count({ mailbox => \f(CW$mailbox\fP })" .IX Subsection "unseen_count({ mailbox => $mailbox })" returnes the number of unseen messages in a mailbox .SS "check_sort($sort)" .IX Subsection "check_sort($sort)" Checks if the given sort criteria is valid. .ie n .SS "get_folder_uids({ mailbox => $mailbox, sort => $sort, range => $range })" .el .SS "get_folder_uids({ mailbox => \f(CW$mailbox\fP, sort => \f(CW$sort\fP, range => \f(CW$range\fP })" .IX Subsection "get_folder_uids({ mailbox => $mailbox, sort => $sort, range => $range })" Returns a MessageSet object representing all UIDs in a mailbox The range option accepts a range of UIDs (for example 1:100 or 1:*), if you specify a range containing '*' the last (highest \s-1UID\s0) message will always be returned. .SS "get_headers_hash({ uids => [qw/ 1 .. 10 /], sort => [qw/ date /], headers => [qw/ date subject /], mailbox => '\s-1INBOX\s0' })" .IX Subsection "get_headers_hash({ uids => [qw/ 1 .. 10 /], sort => [qw/ date /], headers => [qw/ date subject /], mailbox => 'INBOX' })" returnes a array of hashes for messages in a mailbox .IP "\(bu" 4 uids (arrayref): a list of uids (as described in \s-1RFC2060\s0) to fetch .IP "\(bu" 4 sort (arrayref): sort criteria (as described in \s-1RFC2060\s0). for example: [ qw/ date / ] will sort by date, [ qw/ reverse date / ] will sort by reverse date .IP "\(bu" 4 headers (arrayref, required): a list of mail-headers to fetch. .IP "\(bu" 4 mailbox (required) .SS "\fBsearch()\fP" .IX Subsection "search()" searches a mailbox returns a arrayref containing a list of UIDs .ie n .SS "all_headers({ mailbox => $mailbox, uid => $uid })" .el .SS "all_headers({ mailbox => \f(CW$mailbox\fP, uid => \f(CW$uid\fP })" .IX Subsection "all_headers({ mailbox => $mailbox, uid => $uid })" fetch all headers for a message and updates the local headercache .ie n .SS "get_headers({ mailbox => $mailbox })" .el .SS "get_headers({ mailbox => \f(CW$mailbox\fP })" .IX Subsection "get_headers({ mailbox => $mailbox })" fetch headers for a single message from the server or (if available) the local headercache .ie n .SS "mark_read({ mailbox => $mailbox, uid => $uid })" .el .SS "mark_read({ mailbox => \f(CW$mailbox\fP, uid => \f(CW$uid\fP })" .IX Subsection "mark_read({ mailbox => $mailbox, uid => $uid })" mark a messages as read .ie n .SS "mark_answered({ mailbox => $mailbox, uid => $uid })" .el .SS "mark_answered({ mailbox => \f(CW$mailbox\fP, uid => \f(CW$uid\fP })" .IX Subsection "mark_answered({ mailbox => $mailbox, uid => $uid })" mark a message as answered .ie n .SS "toggle_important({ mailbox => $mailbox, uid => $uid })" .el .SS "toggle_important({ mailbox => \f(CW$mailbox\fP, uid => \f(CW$uid\fP })" .IX Subsection "toggle_important({ mailbox => $mailbox, uid => $uid })" toggle the important/flagged \s-1IMAP\s0 flag. returnes 'flagged' if the flag is now set, otherwise returnes undef. .ie n .SS "get_flags({ mailbox => $mailbox, uid => $uid })" .el .SS "get_flags({ mailbox => \f(CW$mailbox\fP, uid => \f(CW$uid\fP })" .IX Subsection "get_flags({ mailbox => $mailbox, uid => $uid })" fetches the flags of a message, returnes a hashref with the lowercased flag names as keys .ie n .SS "bodypart_as_string({ mailbox => $mailbox, uid => $uid, parts => [ $part ] })" .el .SS "bodypart_as_string({ mailbox => \f(CW$mailbox\fP, uid => \f(CW$uid\fP, parts => [ \f(CW$part\fP ] })" .IX Subsection "bodypart_as_string({ mailbox => $mailbox, uid => $uid, parts => [ $part ] })" fetches body part(s) of a message \- part IDs according to the bodystructure of the message .ie n .SS "get_bodystructure({ mailbox => $mailbox, uid => $uid })" .el .SS "get_bodystructure({ mailbox => \f(CW$mailbox\fP, uid => \f(CW$uid\fP })" .IX Subsection "get_bodystructure({ mailbox => $mailbox, uid => $uid })" fetches bodystructure of a message. returns a Mail::IMAPClient::BodyStructure object \- this might change when we parse this into something more usefull .ie n .SS "message_as_string({ mailbox => $mailbox, uid => $uid })" .el .SS "message_as_string({ mailbox => \f(CW$mailbox\fP, uid => \f(CW$uid\fP })" .IX Subsection "message_as_string({ mailbox => $mailbox, uid => $uid })" return a full message body as string .ie n .SS "delete_messages({ mailbox => $mailbox, uid => $uid })" .el .SS "delete_messages({ mailbox => \f(CW$mailbox\fP, uid => \f(CW$uid\fP })" .IX Subsection "delete_messages({ mailbox => $mailbox, uid => $uid })" delete message(s) form the server and expunge the mailbox .ie n .SS "append_message({ mailbox => $mailbox, message_text => $message_text })" .el .SS "append_message({ mailbox => \f(CW$mailbox\fP, message_text => \f(CW$message_text\fP })" .IX Subsection "append_message({ mailbox => $mailbox, message_text => $message_text })" low level method to append an RFC822\-formatted message to a mailbox .ie n .SS "move_message({ mailbox => $mailbox, target_mailbox => $target_mailbox, uid => $uid })" .el .SS "move_message({ mailbox => \f(CW$mailbox\fP, target_mailbox => \f(CW$target_mailbox\fP, uid => \f(CW$uid\fP })" .IX Subsection "move_message({ mailbox => $mailbox, target_mailbox => $target_mailbox, uid => $uid })" Move a message to another mailbox .ie n .SS "create_mailbox({ mailbox => $mailbox, name => $name })" .el .SS "create_mailbox({ mailbox => \f(CW$mailbox\fP, name => \f(CW$name\fP })" .IX Subsection "create_mailbox({ mailbox => $mailbox, name => $name })" Create a subfolder .ie n .SS "delete_mailbox({ mailbox => $mailbox })" .el .SS "delete_mailbox({ mailbox => \f(CW$mailbox\fP })" .IX Subsection "delete_mailbox({ mailbox => $mailbox })" Delete a complete folder .ie n .SS "get_quotas({ mailbox => $mailbox })" .el .SS "get_quotas({ mailbox => \f(CW$mailbox\fP })" .IX Subsection "get_quotas({ mailbox => $mailbox })" Get a list of quotaroots that apply to the specified mailbox .SH "AUTHOR" .IX Header "AUTHOR" Stefan Seifert and Mathias Reitinger .SH "LICENSE" .IX Header "LICENSE" This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.