Specifications

60
SeenMessageHashes = []
SeenMessageHashesPreviousRuns = SeenMessageHashes[:]#TODO learn better why this
is actually required!
AppendedSummer = 0
AppendedWinter = 0
AppendedWithInstant = 0
AppendedDiagnostics = 0
ApendedMalformed = 0
ProcessedInfostoreName = ''
ProcessedFolderName = ''
try:
cdo = Dispatch("MAPI.session")
DeafultLoginName = win32api.GetUserName()
Login_Prompt = 'Enter the login name (defaults to "%s"): ' %DeafultLoginName
LoginName = raw_input(Login_Prompt)
if not LoginName: LoginName = DeafultLoginName
try: #this is to catch all otherwise unhandleld exceptions and logoff from the server
try:
print 'Logging in as %s...' %LoginName,
cdo.Logon(LoginName) # MAPI profile name
LoggedIn = True
print ' OK'
except pywintypes.com_error, errordetails:
print 'ERROR: COM API error %s (%s) - wrong login' %(errordetails[0],
errordetails[1])
sys.exit()
InfoStores=cdo.InfoStores
InfoStoresCount = cdo.InfoStores.Count
print '\nThere are %i infostores available:' %InfoStoresCount
DefaultInfoStore = 'Postkasse - ice'
DefaultInfoStoreNum = 0
#InfoStoreNum = 0
InfoStoresList = []
for it in range(InfoStoresCount):
InfoStoreName = InfoStores[it].Name
InfoStoresList.append(InfoStoreName)
print '%i) %s' %(it+1, InfoStoreName.encode(UnicodeEncoding))
if InfoStoreName == DefaultInfoStore: DefaultInfoStoreNum = it#+1
if DefaultInfoStoreNum:
InfoStore_Prompt = 'Enter the desired infostore [1, %i] (defaults to "%s"): '
%(InfoStoresCount, DefaultInfoStore.encode(UnicodeEncoding))
else: