Messaging: Improve logging
This commit is contained in:
parent
d18ebfe912
commit
6ebd3b82b6
@ -113,17 +113,21 @@ Public Class Limilab
|
||||
End Try
|
||||
End Function
|
||||
Public Function IMAPGetMessageIDs_AllMails() As List(Of Long)
|
||||
Dim oListuids As New List(Of Long)
|
||||
Logger.Debug("Starting IMAPGetMessageIDs ...")
|
||||
If Initialized = False Then
|
||||
Return Nothing
|
||||
End If
|
||||
Try
|
||||
Dim oConnect As Boolean = ImapConnect()
|
||||
Dim oConnectionSuccessful As Boolean = ImapConnect()
|
||||
Dim oListuids As List(Of Long)
|
||||
|
||||
If oConnect = True Then
|
||||
If oConnectionSuccessful = True Then
|
||||
Logger.Debug("Checking for new messages..")
|
||||
oListuids = ImapGetMessageIDs_All()
|
||||
CURR_ListUIDs = oListuids
|
||||
Else
|
||||
Logger.Warn("Connection was NOT successful. Returning Nothing.")
|
||||
Return Nothing
|
||||
End If
|
||||
Return oListuids
|
||||
Catch ex As Exception
|
||||
@ -223,10 +227,13 @@ Public Class Limilab
|
||||
Private Function ImapGetMessageIDs_All() As List(Of Long)
|
||||
Dim oListuids As New List(Of Long)
|
||||
Try
|
||||
Logger.Debug("Opening Inbox..")
|
||||
CurrentImapObject.SelectInbox()
|
||||
|
||||
Logger.Debug("Searching messages..")
|
||||
oListuids = CurrentImapObject.Search(Flag.All)
|
||||
|
||||
Logger.Debug("[{0}] messages found.", oListuids.Count)
|
||||
Return oListuids
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user