mirror of
https://github.com/imapsync/imapsync.git
synced 2024-11-17 08:12:48 +01:00
24 lines
453 B
Plaintext
24 lines
453 B
Plaintext
|
#!/usr/bin/perl -w
|
||
|
|
||
|
use Mail::IMAPClient;
|
||
|
|
||
|
$ARGV[3] or die "usage: $0 host user password folder\n";
|
||
|
|
||
|
$host = $ARGV[0];
|
||
|
$user = $ARGV[1];
|
||
|
$password = $ARGV[2];
|
||
|
$folder = $ARGV[3];
|
||
|
|
||
|
my $imap = Mail::IMAPClient->new();
|
||
|
$imap->Debug(1);
|
||
|
$imap->Server($host);
|
||
|
$imap->connect() or die;
|
||
|
$imap->isUnconnected();
|
||
|
$imap->User($user);
|
||
|
$imap->Password($password);
|
||
|
$imap->login() or die;
|
||
|
$imap->Uid(1);
|
||
|
$imap->Peek(1);
|
||
|
$imap->select($folder) or die;
|
||
|
$imap->close();
|