Compare commits

...

3 Commits

6 changed files with 53 additions and 9 deletions

View File

@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("DigitalData.EMLProfiler")>
<Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("3.1.0.0")>
<Assembly: AssemblyTrademark("3.1.1.0")>
<Assembly: ComVisible(False)>
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.0.0")>
<Assembly: AssemblyFileVersion("3.1.0.0")>
<Assembly: AssemblyVersion("3.1.1.0")>
<Assembly: AssemblyFileVersion("3.1.1.0")>

View File

@ -208,9 +208,8 @@ Public Class clsWorkEmail
_Logger.Debug("CommonEmail-Process-Sniffer")
Dim oCommonEmailResult = CommonEmail_IN(_CurrentMail)
If oCommonEmailResult = False Then
' Allgemeine Verarbeitung der EMail
If CommonEmail_IN(_CurrentMail) = False Then
Return False
End If
@ -1010,12 +1009,12 @@ Public Class clsWorkEmail
Else
oAttachmentCount -= 1
CleanUpFilePath(oEmailAttachment.DestFilePath)
UpdateAttachmentTableAfterError(oEmailAttachment.OrgFileName, pCurrentMail.MessageId, "PDF Structure corrupt")
oEmailAttachment.FileStatus = oStatus
oEmailAttachment.ErrorCodeValue = ErrorCode.NormalFileAttachmentCorrupt
oEmailAttachment.ErrorCodeComment = "PDF Structure corrupt"
oEmailAttachment.IsAttachmentValid = False
MESSAGE_ERROR = True
Continue For
End If
@ -1039,6 +1038,7 @@ Public Class clsWorkEmail
End Function
''' <summary>
''' Holt aus alle Anhängen diejenigen raus,
''' die einen erlaubten Dateianhang haben
@ -1153,6 +1153,38 @@ Public Class clsWorkEmail
End Try
End Function
''' <summary>
''' Aktualisiert Datensätze in der Tabelle TBEMLP_HISTORY_ATTACHMENT
''' wenn ein Fehler bei einem Attachment aufgetreten ist.
''' </summary>
Private Sub UpdateAttachmentTableAfterError(pOrgFileName As String, pMessageID As String, pComment As String)
If String.IsNullOrEmpty(pOrgFileName) Then
_Logger.Info("Parameter [pOrgFileName] missing")
Return
End If
If String.IsNullOrEmpty(pMessageID) Then
_Logger.Info("Parameter [pMessageID] missing")
Return
End If
If pComment Is Nothing Then
pComment = "-"
Return
End If
Dim updateSQL As String = "UPDATE [DD_ECM].[dbo].[TBEMLP_HISTORY_ATTACHMENT] SET COMMENT = '@PARAM_COMMENT', EMAIL_ATTMT_INDEX = '-' WHERE EMAIL_MSGID = '@PARAM_MSGID' AND EMAIL_ATTMT = '@PARAM_ORGFILE';"
updateSQL = updateSQL.Replace("@PARAM_COMMENT", pComment)
updateSQL = updateSQL.Replace("@PARAM_MSGID", pMessageID)
updateSQL = updateSQL.Replace("@PARAM_ORGFILE", pOrgFileName)
_Logger.Info("Execute UPDATE-SQL: [{0}]", updateSQL)
_DB_MSSQL.ExecuteNonQuery(updateSQL)
End Sub
''' <summary>
''' Falls Datei bereits existiert, lösche sie jetzt
''' </summary>

View File

@ -10,6 +10,9 @@ EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EmailProfiler.Common", "EmailProfiler.Common\EmailProfiler.Common.vbproj", "{9F748DCD-952E-40A0-9DAD-65BF8A39B231}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "wisag_check_Att", "wisag_check_Att\wisag_check_Att.vbproj", "{CD67B0B9-A7DE-447D-9982-E7AC43481DDC}"
ProjectSection(ProjectDependencies) = postProject
{9F748DCD-952E-40A0-9DAD-65BF8A39B231} = {9F748DCD-952E-40A0-9DAD-65BF8A39B231}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -98,14 +98,14 @@ Partial Class Form1
'
'BarButtonItem4
'
Me.BarButtonItem4.Caption = "Extract PDF-Attachments"
Me.BarButtonItem4.Caption = "Extract Attachments from PDF-File"
Me.BarButtonItem4.Id = 6
Me.BarButtonItem4.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem4.Name = "BarButtonItem4"
'
'btExtractMailAttachments
'
Me.btExtractMailAttachments.Caption = "Extract Mail-Attachments"
Me.btExtractMailAttachments.Caption = "Extract Attachments from EML-File"
Me.btExtractMailAttachments.Id = 7
Me.btExtractMailAttachments.ImageOptions.SvgImage = CType(resources.GetObject("btExtractMailAttachments.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.btExtractMailAttachments.Name = "btExtractMailAttachments"

View File

@ -70,6 +70,12 @@ Public Class Form1
Private Sub btRunEmailCheck_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btRunEmailCheck.ItemClick
' Check Email
ListBox1.Items.Clear()
If bsifolderbrowser Is Nothing Or String.IsNullOrEmpty(bsifolderbrowser.Caption) Then
MsgBox("Es wurde kein input-Verzeichnis konfiguriert. Abbruch!", MsgBoxStyle.Information)
Return
End If
Dim di As New DirectoryInfo(bsifolderbrowser.Caption)
' Get a reference to each file in that directory.
Dim fiArr As FileInfo() = di.GetFiles()

View File

@ -65,6 +65,9 @@
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="EmailProfiler.Common">
<HintPath>..\EmailProfiler.Common\bin\Debug\EmailProfiler.Common.dll</HintPath>
</Reference>
<Reference Include="GdPicture.NET.14, Version=14.2.90.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.2.90\lib\net462\GdPicture.NET.14.dll</HintPath>
</Reference>