looking for a specific "howto" example with Mail::IMAPClient
From: New2code (perl-beginners.20.new2code_at_spamgourmet.com)
Date: 06/04/04
- Next message: Dennis G. Wicks: "Looking for "\n" shortcut."
- Previous message: Steven Sommer: "Re: unpack() help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 03 Jun 2004 19:30:54 -0700 To: beginners@perl.org
hi,
i've inherited my company's mail server (the tech guy quit), and i need to manage a 'cleanup'.
in doing so, i've come to understand that a perl script will best do what i need.
as i'm new to perl, i'm hoping to get help with a specific howto example from someone here that'll get me started ...
for my particular issue, i need to:
(1) login to the imap mail server as its "postmaster" (user with full priveleges)
(2) get a list of Domains & Accounts on the server
(3) for each existing Domain+Account pair, access two folders with the same relative-path, e.g. "/test/good" & "/test/bad"
(4) delete all the messages in each "/test/bad" folder
(5) move all the messages in each "/test/good" folder to the same Account's "/Inbox" folder
I've got perl version 5.8.4 running, and can write/execute simple scripts now.
I've also installed the Mail::IMAPClient module using the cpan utility.
I've managed the obvious part, well i stole it from an example:
$host = "mail.mydomain.com";
$id = "postmaster";
$pass = "XXXXXXX";
$imap = Mail::IMAPClient->new(
Server => $host,
User => $id,
Password=> $pass,
) or die "Cannot connect to $host as $id: $@";
but get lost as to how to do the rest. These objects (are they?) have me a bit confused ...
can someone help with a walk through of the rest?
kate
- Next message: Dennis G. Wicks: "Looking for "\n" shortcut."
- Previous message: Steven Sommer: "Re: unpack() help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|