This commit is contained in:
2023-01-24 16:32:36 +01:00
parent 613b0c0765
commit 5e51e9e9f3
22 changed files with 142 additions and 13794 deletions

View File

@@ -48,24 +48,19 @@
<HintPath>..\packages\AE.Net.Mail.1.7.10.0\lib\net45\AE.Net.Mail.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Base">
<HintPath>..\..\..\DDMonorepo\Modules.Base\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
<HintPath>..\..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database, Version=1.0.0.4, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\DDMonorepo\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
<Reference Include="DigitalData.Modules.Database">
<HintPath>..\..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Filesystem">
<HintPath>..\..\..\DDMonorepo\Modules.Filesystem\bin\Debug\DigitalData.Modules.Filesystem.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Language, Version=1.5.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\DDMonorepo\Modules.Language\bin\Debug\DigitalData.Modules.Language.dll</HintPath>
<Reference Include="DigitalData.Modules.Language">
<HintPath>..\..\..\DDModules\Language\bin\Debug\DigitalData.Modules.Language.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
<HintPath>..\..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Messaging">
<HintPath>..\..\..\DDMonorepo\Modules.Messaging\bin\Debug\DigitalData.Modules.Messaging.dll</HintPath>
<HintPath>..\..\..\DDModules\Messaging\bin\Debug\DigitalData.Modules.Messaging.dll</HintPath>
</Reference>
<Reference Include="Interop.WINDREAMLib">
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WINDREAMLib.dll</HintPath>

View File

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

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
</configSections>
@@ -7,17 +7,17 @@
<!-- Dieser Abschnitt definiert die Protokollierungskonfiguration für My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog" />
<add name="FileLog"/>
<!-- Auskommentierung des nachfolgenden Abschnitts aufheben, um in das Anwendungsereignisprotokoll zu schreiben -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information" />
<add name="DefaultSwitch" value="Information"/>
</switches>
<sharedListeners>
<add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter" />
<add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
<!-- Auskommentierung des nachfolgenden Abschnitts aufheben und APPLICATION_NAME durch den Namen der Anwendung ersetzen, um in das Anwendungsereignisprotokoll zu schreiben -->
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
@@ -25,9 +25,9 @@
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>

View File

@@ -4,14 +4,14 @@ Imports AE
Imports System.Net
Imports System.Reflection
Imports System.IO
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Messaging
Public Class clsEmailIMAP
Private Shared Logger As DigitalData.Modules.Logging.Logger
Private Shared LogConfig As DigitalData.Modules.Logging.LogConfig
Private Shared Logger As Logger
Private Shared LogConfig As LogConfig
Private _DB_MSSQL As clsDatabase
Private _limilab As DigitalData.Modules.Messaging.Limilab
Private _limilab As Limilab
Sub New(LogConf As LogConfig, ECMConnectionString As String)
LogConfig = LogConf
Logger = LogConf.GetLogger

View File

@@ -3,7 +3,7 @@ Imports NLog
Imports DigitalData.Modules.Logging
Public Class clsEncryption
Private TripleDes As New TripleDESCryptoServiceProvider
Private Logger As DigitalData.Modules.Logging.Logger
Private Logger As Modules.Logging.Logger
Sub New(ByVal key As String, LogConf As LogConfig)
Logger = LogConf.GetLogger
' Initialize the crypto provider.

View File

@@ -89,21 +89,6 @@ Public Class clsWorkEmail
End If
'If IsNothing(CURRENT_MAIL_MESSAGE_ID) Then
' CURRENT_MAIL_MESSAGE_ID = System.Guid.NewGuid.ToString()
'Else
' If CURRENT_MAIL_MESSAGE_ID.Length = 0 Then
' CURRENT_MAIL_MESSAGE_ID = System.Guid.NewGuid.ToString()
' ElseIf CURRENT_MAIL_MESSAGE_ID.Length > MESSAGE_ID_MAX_LENGTH Then
' ' MessageIds longer than 100 chars will be replaced with a guid to avoid errors
' ' because of file paths longer than 255 chars.
' CURRENT_MAIL_MESSAGE_ID = System.Guid.NewGuid.ToString()
' End If
'End If
'CURRENT_MAIL_MESSAGE_ID = CURRENT_MAIL_MESSAGE_ID.Replace(">", "").Replace("<", "")
'CURRENT_MAIL_MESSAGE_ID = CURRENT_MAIL_MESSAGE_ID.Replace("'", "")
If IsNothing(CURRENT_MAIL_SUBJECT) Then
CURRENT_MAIL_SUBJECT = ""
@@ -357,6 +342,7 @@ Public Class clsWorkEmail
End Function
Private Function SAVE2TEMP()
Dim oTempFilename As String
Try
Dim oTempPath As String = Path.Combine(Path.GetTempPath, "DD_EmailProfiler")
Logger.Debug($"oTempPath is: {oTempPath} ...")
@@ -380,7 +366,7 @@ Public Class clsWorkEmail
Logger.Debug($"oSubjectFilename (beforeclean) is: {oSubjectFilename}")
oSubjectFilename = RemoveIllegalFileNameChars(oSubjectFilename)
Dim oTempFilename = oTempPath & "\" & oSubjectFilename
oTempFilename = oTempPath & "\" & oSubjectFilename
Logger.Debug($"oTempFilename (afterclean) is: {oTempFilename}")
Dim oCounter As Integer = 1
@@ -420,6 +406,7 @@ Public Class clsWorkEmail
Return oResult
Catch ex As Exception
Logger.Error(ex)
Logger.Info($"Unexpected error in Save2Temp [{oTempFilename}]")
CURRENT_TEMP_MAIL_PATH = Nothing
'clsLogger.Add("Unexpected Error in COPY2HDD: " & ex.Message & "MESSAGE_ID: " & CURRENT_MAIL_MESSAGE.MessageID, True)
Return False

View File

@@ -39,6 +39,18 @@ Public Class clsWorker
Public Sub Start_WorkingProfiles(Optional LocalEmail As Boolean = False)
Try
For Each _file In TEMP_FILES
Logger.Debug("Trying to delete temp file: [{0}]", _file)
If System.IO.File.Exists(_file) Then
Try
System.IO.File.Delete(_file)
Catch ex As Exception
Logger.Error(ex)
Logger.Warn($"TempFileDelete - Could not delete the tempfile from TEMP_FILES: {ex.Message}")
End Try
End If
Next
TEMP_FILES.Clear()
If _Database.Init(cs) = True Then

View File

@@ -2,5 +2,4 @@
<packages>
<package id="AE.Net.Mail" version="1.7.10.0" targetFramework="net461" />
<package id="NLog" version="5.0.5" targetFramework="net461" />
<package id="S22.Imap" version="3.6.0.0" targetFramework="net461" />
</packages>