jj for ms

This commit is contained in:
2021-04-16 11:36:18 +02:00
parent 03a6d14214
commit 2d8f5fe192
45 changed files with 50 additions and 12 deletions

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.8.0.0")>
<Assembly: AssemblyFileVersion("2.8.0.0")>
<Assembly: AssemblyVersion("2.9.0.0")>
<Assembly: AssemblyFileVersion("2.9.0.0")>

View File

@@ -133,7 +133,7 @@ DigitalData.Modules.Logging
Clears the internal log
</summary>
</member>
<member name="M:DigitalData.Modules.Logging.LogConfig.GetClassFullName">
<member name="M:DigitalData.Modules.Logging.LogConfig.GetClassFullName(System.Boolean)">
<summary>
Gets the fully qualified name of the class invoking the calling method,
including the namespace but Not the assembly.

View File

@@ -202,15 +202,18 @@ Public Class clsEmailIMAP
Dim oFoundMessages As Message() = New Message(oUniqueID.Length - 1) {}
Dim oEnvelopes As Independentsoft.Email.Imap.Envelope() = oClient.ListMessages()
For oCounterEnvelope As Integer = 0 To oEnvelopes.Length - 1
Logger.Debug($"oEnvelopes.Length: {oEnvelopes.Length}")
For oCounterEmailInPostbox As Integer = 0 To oUniqueID.Length - 1
If oEnvelopes(oCounterEnvelope).UniqueID = oUniqueID(oCounterEmailInPostbox) Then
Dim oMimeMessage As Mime.Message = oClient.GetMessage(oEnvelopes(oCounterEnvelope).UniqueID)
If Not IsNothing(oMimeMessage) Then
Dim oMessageID = oMimeMessage.MessageID
oMessageID = oMessageID.Replace(">", "").Replace("<", "")
'oEnvelopes(oCounterEnvelope).UniqueI
Logger.Debug($"Isoft: Working on email: MessageID [{oMessageID}] - Subject[{oEnvelopes(oCounterEnvelope).Subject}] - Date [{oEnvelopes(oCounterEnvelope).Date.ToString}]")
Logger.Info($"Isoft: Working on email: MessageID [{oMessageID}] - Subject[{oEnvelopes(oCounterEnvelope).Subject}] - Date [{oEnvelopes(oCounterEnvelope).Date.ToString}]")
Dim oCHECKSQL = $"SELECT * FROM TBEMLP_HISTORY WHERE lower(EMAIL_MSGID) = lower('{oMessageID}')"
Dim oCHECKDT As DataTable = _DB_MSSQL.Return_Datatable(oCHECKSQL)
If Not IsNothing(oCHECKDT) Then
@@ -227,11 +230,12 @@ Public Class clsEmailIMAP
Dim oUpd = $"UPDATE TBEMLP_HISTORY SET DATE_DELETED_INBOX = GETDATE(), COMMENT = 'DELETED MESSAGE FROM INBOX (2ndRun ALREADY WORKED)' WHERE lower(EMAIL_MSGID) = lower('{oMessageID}')"
_DB_MSSQL.Execute_non_Query(oUpd)
Catch ex As Exception
Logger.Warn($"Error deleting/Commentign message due to to already worked: {ex.Message}")
Logger.Warn($"Error deleting/Commenting message due to to already worked: {ex.Message}")
End Try
End If
oClient.Store(oEnvelopes(oCounterEnvelope).UniqueID, "+FLAGS", "SEEN")
If MoveMailTo <> String.Empty Then
Try
oClient.AddMessage(MoveMailTo, oMimeMessage)
@@ -239,6 +243,10 @@ Public Class clsEmailIMAP
Logger.Warn($"Isoft: Could not move message to folder [{MoveMailTo}] - Error: {ex.Message}")
End Try
End If
If oMessageCountRegular = 250 Then
Logger.Warn($"Worked 100 Mails exiting oCounterEmailInPostbox!")
Exit For
End If
End If
End If

View File

@@ -14,7 +14,7 @@ Public Class clsWorker
Private _wrapper As clsEncryption
Private _POLL_PROFILEID As Integer = 0
Dim cs As String
Sub New(LogConf As LogConfig, ConStr As String, POLL_PROFILEID As Integer, FB_DATASOURCE As String, FB_DATABASE As String, FB_USER As String, FB_PW As String, USE_WM As Boolean, Optional localeml As String = "")
Sub New(LogConf As LogConfig, ConStr As String, POLL_PROFILEID As Integer, FB_DATASOURCE As String, FB_DATABASE As String, FB_USER As String, FB_PW As String, USE_WM As Boolean, Optional plocaleml As String = "")
Logger = LogConf.GetLogger
_email = New clsEmail(LogConf)
_emailIMAP = New clsEmailIMAP(LogConf, ConStr)
@@ -29,7 +29,7 @@ Public Class clsWorker
_workmail = New clsWorkEmail(LogConf, ConStr, FB_DATASOURCE, FB_DATABASE, FB_USER, FB_PW, USE_WM)
_wrapper = New clsEncryption("!35452didalog=", LogConf)
_POLL_PROFILEID = POLL_PROFILEID
ClassCurrent.CURRENT_DEBUG_LOCAL_EMAIL = localeml
ClassCurrent.CURRENT_DEBUG_LOCAL_EMAIL = plocaleml
End Sub
Public Sub Debug_Local_Email()

View File

@@ -0,0 +1,7 @@
' <autogenerated/>
Option Strict Off
Option Explicit On
Imports System
Imports System.Reflection
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName:=".NET Framework 4.6.1")>

View File

@@ -0,0 +1 @@
5c442f91a6238bfda874aa2a69de6ef1e62a37ae

View File

@@ -22,6 +22,7 @@ E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin\Debug\S22.Imap.xml
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.Resources.resources
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.vbproj.GenerateResource.cache
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.vbproj.CoreCompileInputs.cache
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.vbproj.CopyComplete
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.dll
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.xml