aboutsummaryrefslogtreecommitdiffstats
path: root/playWithImap.py
diff options
context:
space:
mode:
Diffstat (limited to 'playWithImap.py')
-rwxr-xr-xplayWithImap.py67
1 files changed, 0 insertions, 67 deletions
diff --git a/playWithImap.py b/playWithImap.py
deleted file mode 100755
index dd68fb6..0000000
--- a/playWithImap.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env python3.6
-
-import configparser
-import os.path
-
-import imapy
-
-config = configparser.ConfigParser()
-config.read(os.path.expanduser('~/.config/imap_archiver.cfg'))
-cfg = dict(config.items(config['general']['account']))
-print(cfg)
-
-
-# my $msg;
-#
-# my $imap = Mail::IMAPClient->new();
-# $imap = Mail::IMAPClient->new(
-# Server => "localhost",
-# User => "matej",
-# Password => "lubdkc",
-# UID => 1
-# ) or die "Cannot connect to localhost as matej: $@";
-#
-# $imap->select('INBOX');
-# my $hash = $imap->fetch_hash("RFC822.SIZE","INTERNALDATE","FLAGS","ENVELOPE");
-# #print Data::Dumper->Dumpxs([$hash],['$hash']);
-#
-# #print "\n===============================\n";
-# my @folders = $imap->folders;
-# #print join("\n",@folders),".\n";
-#
-# #print "\n===============================\n";
-# # or s/folders/subscribed/
-# @folders = $imap->folders("INBOX" . $imap->separator . "Pratele" . $imap->separator);
-# print join("\n",@folders),".\n";
-#
-# print "\n===============================\n";
-# my $msgID;
-# my $headers;
-# foreach $msg (keys(%$hash)) {
-# $msgID = $imap->get_header($msg,"Message-Id");
-# print "\$msg ID = $msg\nMESSAGE-ID = $msgID\n";
-# $headers = $imap->parse_headers($msg,"Date","Received","Subject","To");
-# print "Headers = " . Data::Dumper->Dumpxs([$headers],['$headers']) . "\n";
-# }
-#
-# ## Get a list of messages in the current folder:
-# #my @msgs = $imap->messages or die "Could not messages: $@\n";
-# ## Get a reference to an array of messages in the current folder:
-# #my $msgs = $imap->messages or die "Could not messages: $@\n";
-#
-# #use Mail::IMAPClient;
-# # my $imap = Mail::IMAPClient->new( Server => $imaphost,
-# # User => $login,
-# # Password=> $pass,
-# # Uid => 1, # optional
-# # );
-# #
-# # $imap->select("World Domination");
-# # # get the flags for every message in my 'World Domination' folder
-# # $flaghash = $imap->flags( scalar($imap->search("ALL"))) ;
-# #
-# # # pump through sorted hash keys to print results:
-# # for my $k (sort { $flaghash->{$a} <=> $flaghash->{$b} } keys %$flaghash) {
-# # # print: Message 1: \Flag1, \Flag2, \Flag3
-# # print "Message $k:\t",join(", ",@{$flaghash->{$k}}),"\n";
-# # }