diff --git a/App/EmailProfiler.Common/Data/MailContainer.vb b/App/EmailProfiler.Common/Data/MailContainer.vb
index de357ce..eb6f318 100644
--- a/App/EmailProfiler.Common/Data/MailContainer.vb
+++ b/App/EmailProfiler.Common/Data/MailContainer.vb
@@ -24,6 +24,13 @@ Public Class MailContainer
'''
Public ReadOnly Property MessageId As String
+ '''
+ ''' Eine zweite MessageID, in der das Mail-Datum berücksichtigt wird.
+ ''' Wird verwendet wenn MessageId bereits existiert.
+ '''
+ '''
+ Public ReadOnly Property MessageId2 As String
+
'''
''' The subject, truncated to SUBJECT_MAX_LENGTH characters
'''
@@ -41,6 +48,7 @@ Public Class MailContainer
MessageIdOriginal = pMail.MessageID
MessageId = StringEx.GetShortHash(pMail.MessageID)
+ MessageId2 = StringEx.GetShortHash(pMail.MessageID + pMail.Date.ToString())
Subject = ObjectEx.NotNull(pMail.Subject.Truncate(SUBJECT_MAX_LENGTH), String.Empty)
SubjectOriginal = ObjectEx.NotNull(pMail.Subject, String.Empty)
diff --git a/App/EmailProfiler.Common/My Project/AssemblyInfo.vb b/App/EmailProfiler.Common/My Project/AssemblyInfo.vb
index add18b0..1f00f3f 100644
--- a/App/EmailProfiler.Common/My Project/AssemblyInfo.vb
+++ b/App/EmailProfiler.Common/My Project/AssemblyInfo.vb
@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
-
-
+
+
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
'
-
-
+
+
diff --git a/App/EmailProfiler.Common/clsWorkEmail.vb b/App/EmailProfiler.Common/clsWorkEmail.vb
index b259f37..49f131a 100644
--- a/App/EmailProfiler.Common/clsWorkEmail.vb
+++ b/App/EmailProfiler.Common/clsWorkEmail.vb
@@ -109,53 +109,41 @@ Public Class clsWorkEmail
'TODO: Move all of these CURRENT_MAIL vars into a business object of type mail container
_CurrentMail = New MailContainer(pMailMessage, poUID)
- _Logger.Debug($"Working on email from: {_CurrentMail.SenderAddress}...Subject: {pMailMessage.Subject}")
+ _Logger.Info($"Working on email from: [{_CurrentMail.SenderAddress}] ... Subject: [{_CurrentMail.SubjectOriginal}] ... MessageID: [{_CurrentMail.MessageId}]")
CURRENT_MAIL_BODY_ALL = ""
CURRENT_MAIL_BODY_ANSWER1 = ""
CURRENT_MAIL_BODY_Substr2 = ""
- CURRENT_MAIL_SUBJECT = pMailMessage.Subject.ToUpper.EscapeForSQL()
+ CURRENT_MAIL_SUBJECT = ""
+
+ ' Dieser Eintrag wird weiter unten wieder überschrieben. Wenn Subject IS NULL --> Exception
+ 'CURRENT_MAIL_SUBJECT = pMailMessage.Subject.ToUpper.EscapeForSQL()
CURRENT_MAIL_UID = poUID
- ' 05.06.23
- ' The MessageID is now replaced by a SHA256 Hash of the MessageID
- ' The reason is that MessageIDs can be very long,
- ' which results in the final filepath exceeding the Windream/Windows maximum of 255 chars.
- ' 28.07.23
- ' The SHA256 Hash is now truncated to half the size
- ' which should be a good balance between uniqueness and length
- 'CURRENT_MAIL_MESSAGE_ID = StringEx.GetShortHash(pMailMessage.MessageID)
-
- 'If String.IsNullOrEmpty(CURRENT_MAIL_MESSAGE_ID) Then
- ' CURRENT_MAIL_MESSAGE_ID = 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 = Hash(CURRENT_MAIL_MESSAGE_ID)
- '
- 'Else
- ' ' Default case, should cover most message ids
- ' CURRENT_MAIL_MESSAGE_ID = CURRENT_MAIL_MESSAGE_ID.Replace(">", "").Replace("<", "")
- ' CURRENT_MAIL_MESSAGE_ID = CURRENT_MAIL_MESSAGE_ID.Replace("'", "")
- '
- 'End If
-
- If IsNothing(_CurrentMail.SubjectOriginal) Then
+ If String.IsNullOrEmpty(_CurrentMail.SubjectOriginal) Then
CURRENT_MAIL_SUBJECT = String.Empty
- _Logger.Warn("Subject was nothing!")
+ _Logger.Warn("Subject was empty or nothing!")
Else
CURRENT_MAIL_SUBJECT = _CurrentMail.SubjectOriginal.ToUpper.EscapeForSQL()
_Logger.Debug("Fixed Subject: [{0}]", CURRENT_MAIL_SUBJECT)
End If
+ ' Checking the messageID - could be a duplicate
+ _Logger.Debug($"messageID: '{_CurrentMail.MessageId}' - messageID2: '{_CurrentMail.MessageId2}'")
+
Dim oSql = $"Select COALESCE(MAX(GUID),0) FROM TBEMLP_HISTORY WHERE EMAIL_MSGID = '{_CurrentMail.MessageId}'"
Dim oHistoryID = _DB_MSSQL.GetScalarValue(oSql)
If oHistoryID > 0 And IS_LOCAL_TEST = False Then
- _Logger.Info($"Message with subject [{_CurrentMail.SubjectOriginal}] from [{_CurrentMail.SenderAddress}] has already been worked!")
- Return True
+ _Logger.Warn("Found a MessageID already in use! Try MessageID2")
+
+ oSql = $"Select COALESCE(MAX(GUID),0) FROM TBEMLP_HISTORY WHERE EMAIL_MSGID = '{_CurrentMail.MessageId2}'"
+ oHistoryID = _DB_MSSQL.GetScalarValue(oSql)
+
+ If oHistoryID > 0 And IS_LOCAL_TEST = False Then
+ _Logger.Error("Found a MessageID2 already in use! Could not process email!")
+ Return False
+ End If
End If
Dim oTempMailExists As Boolean = Save2TempDirectory(_CurrentMail)
diff --git a/App/EmailProfiler.Form/EmailProfiler.Form.vbproj b/App/EmailProfiler.Form/EmailProfiler.Form.vbproj
index 536dc3c..a2221f8 100644
--- a/App/EmailProfiler.Form/EmailProfiler.Form.vbproj
+++ b/App/EmailProfiler.Form/EmailProfiler.Form.vbproj
@@ -11,7 +11,7 @@
EmailProfiler.Form
512
WindowsForms
- v4.8
+ v4.6.2
true
diff --git a/App/EmailProfiler.Form/My Project/licenses.licx b/App/EmailProfiler.Form/My Project/licenses.licx
index adc50d5..81285e2 100644
--- a/App/EmailProfiler.Form/My Project/licenses.licx
+++ b/App/EmailProfiler.Form/My Project/licenses.licx
@@ -1,4 +1,3 @@
-DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.GridLookUpEdit, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
diff --git a/App/EmailProfiler.Service/EmailProfiler.Service.vbproj b/App/EmailProfiler.Service/EmailProfiler.Service.vbproj
index ea9ca25..aa93073 100644
--- a/App/EmailProfiler.Service/EmailProfiler.Service.vbproj
+++ b/App/EmailProfiler.Service/EmailProfiler.Service.vbproj
@@ -48,21 +48,23 @@
On
-
- False
- ..\..\..\2_DLL Projekte\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll
+
+ ..\..\..\..\2_DLL Projekte\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll
False
- ..\..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll
+ ..\..\..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll
False
- ..\..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll
+ ..\..\..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll
+
+
+ M:\Bibliotheken\Digital Data\DD_Modules\DigitalData.Modules.Encryption.dll
False
- ..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll
+ ..\..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll
..\EmailProfiler.Common\bin\Debug\EmailProfiler.Common.dll
diff --git a/App/wisag_check_Att/App.config b/App/wisag_check_Att/App.config
index 52a6b81..88da821 100644
--- a/App/wisag_check_Att/App.config
+++ b/App/wisag_check_Att/App.config
@@ -27,6 +27,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/App/wisag_check_Att/Form1.vb b/App/wisag_check_Att/Form1.vb
index 57c8d97..ebe5042 100644
--- a/App/wisag_check_Att/Form1.vb
+++ b/App/wisag_check_Att/Form1.vb
@@ -1,15 +1,15 @@
Imports System.IO
Imports System.Text.RegularExpressions
-Imports DevExpress.Data.Helpers.ExpressiveSortInfo
Imports DigitalData.Modules.Config
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Imports EmailProfiler.Common
Imports GdPicture14
-Imports Independentsoft.Email.Mime
+Imports Message = Independentsoft.Email.Mime.Message
Imports Attachment = Independentsoft.Email.Mime.Attachment
Imports LicenseManager = GdPicture14.LicenseManager
+
Public Class Form1
Private _logger As Logger
Private Shared _MyLogger As LogConfig
diff --git a/App/wisag_check_Att/packages.config b/App/wisag_check_Att/packages.config
index 5782d9c..48659d8 100644
--- a/App/wisag_check_Att/packages.config
+++ b/App/wisag_check_Att/packages.config
@@ -1,6 +1,32 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App/wisag_check_Att/wisag_check_Att.vbproj b/App/wisag_check_Att/wisag_check_Att.vbproj
index 696ff2d..7530b15 100644
--- a/App/wisag_check_Att/wisag_check_Att.vbproj
+++ b/App/wisag_check_Att/wisag_check_Att.vbproj
@@ -51,51 +51,179 @@
On
+
+ ..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll
+
- ..\..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll
+ ..\..\..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll
- ..\..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll
+ ..\..\..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll
- ..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll
+ ..\..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll
-
- ..\EmailProfiler.Common\bin\Debug\EmailProfiler.Common.dll
+
+ ..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll
-
- ..\packages\GdPicture.14.2.90\lib\net462\GdPicture.NET.14.dll
+
+ ..\packages\DocumentFormat.OpenXml.Framework.3.2.0\lib\net46\DocumentFormat.OpenXml.Framework.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.DWG.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Common.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Document.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Email.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.HTML.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenDocument.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.PDF.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.RTF.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.SVG.dll
+
+
+ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.wia.gateway.dll
+ True
- P:\Projekte DIGITAL DATA\DIGITAL DATA - Entwicklung\DLL_Bibliotheken\Email .NET\Bin\Independentsoft.Email.dll
+ M:\Bibliotheken\3rdParty\Independentsoft.Email.dll
-
- P:\Visual Studio Projekte\Bibliotheken\Limilabs\Mail.dll\Mail.dll
+
+ ..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll
+
+ ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll
+
+
+ ..\packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll
+
..\packages\NLog.5.0.5\lib\net46\NLog.dll
+
+ ..\packages\OpenMcdf.2.4.1\lib\net40\OpenMcdf.dll
+
+
+ ..\packages\protobuf-net.3.2.46\lib\net462\protobuf-net.dll
+
+
+ ..\packages\protobuf-net.Core.3.2.46\lib\net462\protobuf-net.Core.dll
+
+
+ ..\packages\RtfPipe.2.0.7677.4303\lib\net45\RtfPipe.dll
+
+
+ ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll
+
+
+ ..\packages\System.CodeDom.8.0.0\lib\net462\System.CodeDom.dll
+
+
+ ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll
+
+
+ ..\packages\System.IO.Packaging.8.0.1\lib\net462\System.IO.Packaging.dll
+
+
+
+ ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll
+
+
+ ..\packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll
+
+
+
+ ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll
+
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll
+
+
+
+ ..\packages\System.Security.Cryptography.Pkcs.8.0.1\lib\net462\System.Security.Cryptography.Pkcs.dll
+
+
+ ..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll
+
+
+ ..\packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll
+
+
+ ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
+
+
+ ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
+
+
@@ -161,12 +289,18 @@
+
+
+ {9f748dcd-952e-40a0-9dad-65bf8a39b231}
+ EmailProfiler.Common
+
+
-
+
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+ Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".
-
+
\ No newline at end of file