my $imap = Mail::Transport::IMAP4->new(...); my $message = $imap->receive($id); $imap->send($message);
See SYNOPSIS in Mail::Transport::Receive
****** UNDER DEVELOPMENT *****, please help testing
The IMAP4 protocol is quite complicated: it is feature rich and allows verious asynchronous actions. The main document describing IMAP is rfc3501 (which obsoleted the original specification of protocol 4r1 in rfc2060 in March 2003).
This package, as part of MailBox, does not implement the actual protocol itself but uses Mail::IMAPClient to do the work. The task for this package is to hide as many differences between that module's interface and the common Mail::Box folder types. Multiple Mail::Box::IMAP4 folders can share one Mail::Transport::IMAP4 connection.