Compare commits
15 Commits
Release-Mo
...
59bcc20ca3
| Author | SHA1 | Date | |
|---|---|---|---|
| 59bcc20ca3 | |||
| 149a2bf41f | |||
|
|
971efb5a17 | ||
| c8912dd449 | |||
| 5b3d2bf2c3 | |||
| 7204390e85 | |||
|
|
9dccbee8c9 | ||
|
|
3bb1531a77 | ||
|
|
396a02382f | ||
|
|
aa51911e72 | ||
|
|
af916cc5d2 | ||
|
|
5980d907b2 | ||
|
|
7f95c28b5e | ||
|
|
6b291e82a7 | ||
|
|
35bdee53e3 |
@@ -24,6 +24,13 @@ Public Class MailContainer
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Public ReadOnly Property MessageId As String
|
Public ReadOnly Property MessageId As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Eine zweite MessageID, in der das Mail-Datum berücksichtigt wird.
|
||||||
|
''' Wird verwendet wenn MessageId bereits existiert.
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public ReadOnly Property MessageId2 As String
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' The subject, truncated to SUBJECT_MAX_LENGTH characters
|
''' The subject, truncated to SUBJECT_MAX_LENGTH characters
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@@ -41,6 +48,7 @@ Public Class MailContainer
|
|||||||
|
|
||||||
MessageIdOriginal = pMail.MessageID
|
MessageIdOriginal = pMail.MessageID
|
||||||
MessageId = StringEx.GetShortHash(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)
|
Subject = ObjectEx.NotNull(pMail.Subject.Truncate(SUBJECT_MAX_LENGTH), String.Empty)
|
||||||
SubjectOriginal = ObjectEx.NotNull(pMail.Subject, String.Empty)
|
SubjectOriginal = ObjectEx.NotNull(pMail.Subject, String.Empty)
|
||||||
|
|||||||
@@ -53,22 +53,22 @@
|
|||||||
<HintPath>..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
|
<HintPath>..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Base">
|
<Reference Include="DigitalData.Modules.Base">
|
||||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
<HintPath>..\..\..\..\2_DLL Projekte\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Config">
|
<Reference Include="DigitalData.Modules.Config">
|
||||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
<HintPath>..\..\..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Database">
|
<Reference Include="DigitalData.Modules.Database">
|
||||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
<HintPath>..\..\..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Logging">
|
<Reference Include="DigitalData.Modules.Logging">
|
||||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
<HintPath>..\..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Messaging">
|
<Reference Include="DigitalData.Modules.Messaging">
|
||||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Messaging\bin\Debug\DigitalData.Modules.Messaging.dll</HintPath>
|
<HintPath>..\..\..\..\2_DLL Projekte\DDModules\Messaging\bin\Debug\DigitalData.Modules.Messaging.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Patterns">
|
<Reference Include="DigitalData.Modules.Patterns">
|
||||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Patterns\bin\Debug\DigitalData.Modules.Patterns.dll</HintPath>
|
<HintPath>..\..\..\..\2_DLL Projekte\DDModules\Patterns\bin\Debug\DigitalData.Modules.Patterns.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
|
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
|
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyDescription("")>
|
<Assembly: AssemblyDescription("")>
|
||||||
<Assembly: AssemblyCompany("")>
|
<Assembly: AssemblyCompany("")>
|
||||||
<Assembly: AssemblyProduct("DigitalData.EMLProfiler")>
|
<Assembly: AssemblyProduct("DigitalData.EMLProfiler")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
<Assembly: AssemblyCopyright("Copyright © 2026")>
|
||||||
<Assembly: AssemblyTrademark("3.0.10.0")>
|
<Assembly: AssemblyTrademark("3.5.2.0")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("3.5.0.0")>
|
<Assembly: AssemblyVersion("3.5.2.0")>
|
||||||
<Assembly: AssemblyFileVersion("3.5.0.0")>
|
<Assembly: AssemblyFileVersion("3.5.2.0")>
|
||||||
|
|||||||
@@ -117,45 +117,30 @@ Public Class clsWorkEmail
|
|||||||
|
|
||||||
CURRENT_MAIL_UID = poUID
|
CURRENT_MAIL_UID = poUID
|
||||||
|
|
||||||
' 05.06.23
|
If String.IsNullOrEmpty(_CurrentMail.SubjectOriginal) Then
|
||||||
' 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
|
|
||||||
CURRENT_MAIL_SUBJECT = String.Empty
|
CURRENT_MAIL_SUBJECT = String.Empty
|
||||||
_Logger.Warn("Subject was nothing!")
|
_Logger.Warn("Subject was empty or nothing!")
|
||||||
Else
|
Else
|
||||||
CURRENT_MAIL_SUBJECT = _CurrentMail.SubjectOriginal.ToUpper.EscapeForSQL()
|
CURRENT_MAIL_SUBJECT = _CurrentMail.SubjectOriginal.ToUpper.EscapeForSQL()
|
||||||
_Logger.Debug("Fixed Subject: [{0}]", CURRENT_MAIL_SUBJECT)
|
_Logger.Debug("Fixed Subject: [{0}]", CURRENT_MAIL_SUBJECT)
|
||||||
End If
|
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 oSql = $"Select COALESCE(MAX(GUID),0) FROM TBEMLP_HISTORY WHERE EMAIL_MSGID = '{_CurrentMail.MessageId}'"
|
||||||
Dim oHistoryID = _DB_MSSQL.GetScalarValue(oSql)
|
Dim oHistoryID = _DB_MSSQL.GetScalarValue(oSql)
|
||||||
|
|
||||||
If oHistoryID > 0 And IS_LOCAL_TEST = False Then
|
If oHistoryID > 0 And IS_LOCAL_TEST = False Then
|
||||||
_Logger.Info($"Message with subject [{_CurrentMail.SubjectOriginal}] from [{_CurrentMail.SenderAddress}] has already been worked!")
|
_Logger.Warn("Found a MessageID already in use! Try MessageID2")
|
||||||
Return True
|
|
||||||
|
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
|
End If
|
||||||
|
|
||||||
Dim oTempMailExists As Boolean = Save2TempDirectory(_CurrentMail)
|
Dim oTempMailExists As Boolean = Save2TempDirectory(_CurrentMail)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<AssemblyName>EmailProfiler.Form</AssemblyName>
|
<AssemblyName>EmailProfiler.Form</AssemblyName>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<MyType>WindowsForms</MyType>
|
<MyType>WindowsForms</MyType>
|
||||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -48,21 +48,20 @@
|
|||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="DigitalData.Modules.Base, Version=1.3.6.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="DigitalData.Modules.Base">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\..\..\..\2_DLL Projekte\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
||||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Config, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="DigitalData.Modules.Config, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
<HintPath>..\..\..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Database, Version=2.3.4.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="DigitalData.Modules.Database, Version=2.3.4.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
<HintPath>..\..\..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Logging, Version=2.6.3.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="DigitalData.Modules.Logging, Version=2.6.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
<HintPath>..\..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="EmailProfiler.Common">
|
<Reference Include="EmailProfiler.Common">
|
||||||
<HintPath>..\EmailProfiler.Common\bin\Debug\EmailProfiler.Common.dll</HintPath>
|
<HintPath>..\EmailProfiler.Common\bin\Debug\EmailProfiler.Common.dll</HintPath>
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Text.RegularExpressions
|
Imports System.Text.RegularExpressions
|
||||||
Imports DevExpress.Data.Helpers.ExpressiveSortInfo
|
|
||||||
Imports DigitalData.Modules.Config
|
Imports DigitalData.Modules.Config
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports EmailProfiler.Common
|
Imports EmailProfiler.Common
|
||||||
Imports GdPicture14
|
Imports GdPicture14
|
||||||
Imports Independentsoft.Email.Mime
|
Imports Message = Independentsoft.Email.Mime.Message
|
||||||
Imports Attachment = Independentsoft.Email.Mime.Attachment
|
Imports Attachment = Independentsoft.Email.Mime.Attachment
|
||||||
Imports LicenseManager = GdPicture14.LicenseManager
|
Imports LicenseManager = GdPicture14.LicenseManager
|
||||||
|
|
||||||
|
|
||||||
Public Class Form1
|
Public Class Form1
|
||||||
Private _logger As Logger
|
Private _logger As Logger
|
||||||
Private Shared _MyLogger As LogConfig
|
Private Shared _MyLogger As LogConfig
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
<HintPath>..\packages\GdPicture.14.2.90\lib\net462\GdPicture.NET.14.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.2.90\lib\net462\GdPicture.NET.14.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Independentsoft.Email">
|
<Reference Include="Independentsoft.Email">
|
||||||
<HintPath>P:\Projekte DIGITAL DATA\DIGITAL DATA - Entwicklung\DLL_Bibliotheken\Email .NET\Bin\Independentsoft.Email.dll</HintPath>
|
<HintPath>M:\Bibliotheken\3rdParty\Independentsoft.Email.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Mail">
|
<Reference Include="Mail">
|
||||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Limilabs\Mail.dll\Mail.dll</HintPath>
|
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Limilabs\Mail.dll\Mail.dll</HintPath>
|
||||||
|
|||||||
Reference in New Issue
Block a user