Integration of LimiLabs, Init
This commit is contained in:
@@ -1,22 +1,9 @@
|
|||||||
Imports Independentsoft
|
Imports Independentsoft
|
||||||
|
Imports Limilabs.Mail
|
||||||
|
Imports Limilabs.Mail.MSG
|
||||||
Imports System.Text.RegularExpressions
|
Imports System.Text.RegularExpressions
|
||||||
|
|
||||||
Public Class ClassEmailHeaderExtractor
|
Public Class ClassEmailHeaderExtractor
|
||||||
''' <summary>
|
|
||||||
''' Extrahiert die Headerinformationen aus einer .msg Datei mithilfe der MSG.NET Klasse
|
|
||||||
''' </summary>
|
|
||||||
''' <param name="path">Der Pfad einer .msg Datei</param>
|
|
||||||
''' <returns>Headerinformationen als String oder Nothing wenn ein Fehler aufgetreten ist.</returns>
|
|
||||||
Public Shared Function getMessageHeaders(path As String)
|
|
||||||
Try
|
|
||||||
Dim msg As New Msg.Message(path)
|
|
||||||
Dim headers = msg.TransportMessageHeaders.Replace(vbCrLf, " ")
|
|
||||||
Return headers
|
|
||||||
Catch ex As Exception
|
|
||||||
Return Nothing
|
|
||||||
End Try
|
|
||||||
End Function
|
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Extrahiert die Headerinformationen aus einem msg Objekt mithilfe der MSG.NET Klasse
|
''' Extrahiert die Headerinformationen aus einem msg Objekt mithilfe der MSG.NET Klasse
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@@ -56,7 +43,7 @@ Public Class ClassEmailHeaderExtractor
|
|||||||
End Function
|
End Function
|
||||||
Public Shared Function extractFromHeader(messageHeaders As String, Regex As String)
|
Public Shared Function extractFromHeader(messageHeaders As String, Regex As String)
|
||||||
Try
|
Try
|
||||||
Dim result
|
Dim result = Nothing
|
||||||
Dim i As Integer = 0
|
Dim i As Integer = 0
|
||||||
If IsNothing(messageHeaders) Then
|
If IsNothing(messageHeaders) Then
|
||||||
Return Nothing
|
Return Nothing
|
||||||
@@ -68,6 +55,8 @@ Public Class ClassEmailHeaderExtractor
|
|||||||
' die Vorkommen im String auslesen
|
' die Vorkommen im String auslesen
|
||||||
For Each myMatch As Match In myRegex.Matches(strTargetString)
|
For Each myMatch As Match In myRegex.Matches(strTargetString)
|
||||||
If myMatch.Success Then
|
If myMatch.Success Then
|
||||||
|
LOGGER.Debug("Match success. Matched Value: [{0}]", myMatch.Value)
|
||||||
|
|
||||||
If myMatch.Value <> "" Then
|
If myMatch.Value <> "" Then
|
||||||
If i = 0 Then
|
If i = 0 Then
|
||||||
result = myMatch.Value.ToString
|
result = myMatch.Value.ToString
|
||||||
@@ -76,14 +65,19 @@ Public Class ClassEmailHeaderExtractor
|
|||||||
End If
|
End If
|
||||||
i += 1
|
i += 1
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
LOGGER.Debug("Match failed!")
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
LOGGER.Debug("Extracted value: [{0}]", result)
|
||||||
|
|
||||||
Return result
|
Return result
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
LOGGER.Error(ex)
|
||||||
MsgBox("Unexpected Error in extractFromHeader: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Unexpected Error in extractFromHeader: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports System.Guid
|
||||||
Imports System.Text.RegularExpressions
|
Imports System.Text.RegularExpressions
|
||||||
Imports DevExpress.XtraEditors
|
Imports DevExpress.XtraEditors
|
||||||
Imports Independentsoft
|
Imports Independentsoft
|
||||||
Imports DigitalData.Modules.Language
|
Imports DigitalData.Modules.Language
|
||||||
|
Imports Limilabs.Mail
|
||||||
|
|
||||||
Public Class ClassFilehandle
|
Public Class ClassFilehandle
|
||||||
Public Shared Function Decide_FileHandle(pFilename As String, pHandletype As String)
|
Public Shared Function Decide_FileHandle(pFilename As String, pHandletype As String)
|
||||||
@@ -30,9 +32,9 @@ Public Class ClassFilehandle
|
|||||||
|
|
||||||
If oResult = MsgBoxResult.Yes Then
|
If oResult = MsgBoxResult.Yes Then
|
||||||
If pHandletype.StartsWith("|FW") Then
|
If pHandletype.StartsWith("|FW") Then
|
||||||
Return Email_Decay(pFilename, True)
|
Return Save_EmailAndAttachmentsToDisk(pFilename, True)
|
||||||
Else
|
Else
|
||||||
Return Email_Decay(pFilename)
|
Return Save_EmailAndAttachmentsToDisk(pFilename)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -53,6 +55,59 @@ Public Class ClassFilehandle
|
|||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Shared Function Save_EmailAndAttachmentsToDisk(pEmailFilePath As String, Optional pFolderWatch As Boolean = False) As Boolean
|
||||||
|
Try
|
||||||
|
Dim oMessageOnlyMarker As String = "|MSGONLY|"
|
||||||
|
Dim oExtractedAttachmentMarker As String = "|ATTMNTEXTRACTED|"
|
||||||
|
If pFolderWatch = True Then
|
||||||
|
oMessageOnlyMarker = "|FW_MSGONLY|"
|
||||||
|
oExtractedAttachmentMarker = "|FW_ATTMNTEXTRACTED|"
|
||||||
|
End If
|
||||||
|
Dim oSuccess As Boolean = False
|
||||||
|
|
||||||
|
LOGGER.Info("Converting file to Eml if needed: [{0}]", pEmailFilePath)
|
||||||
|
Dim oEmailFilePath = EMAIL.Convert_MsgToEml(pEmailFilePath)
|
||||||
|
Dim oEmail As IMail = EMAIL.Load_Email(oEmailFilePath)
|
||||||
|
|
||||||
|
If oEmail.MessageID IsNot Nothing Then
|
||||||
|
CURRENT_MESSAGEID = oEmail.MessageID
|
||||||
|
Else
|
||||||
|
LOGGER.Info("Es konnte keine Message-ID gelesen werden. Eine GUID wird erzeugt!")
|
||||||
|
CURRENT_MESSAGEID = NewGuid.ToString()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oEmailFilePathWithoutAttachments = EMAIL.Remove_AttachmentsFromEmail(oEmailFilePath, "_excl_attachments")
|
||||||
|
TEMP_FILES.Add(oEmailFilePathWithoutAttachments)
|
||||||
|
|
||||||
|
If Insert_GI_File(oEmailFilePathWithoutAttachments, oMessageOnlyMarker) = True Then
|
||||||
|
oSuccess = True
|
||||||
|
|
||||||
|
Dim oAttachments As List(Of String) = EMAIL.Save_AttachmentsToDisk(oEmailFilePath)
|
||||||
|
|
||||||
|
LOGGER.Debug("Saved [{0}] attachments to disk.", oAttachments.Count)
|
||||||
|
|
||||||
|
For Each oAttachment In oAttachments
|
||||||
|
TEMP_FILES.Add(oAttachment)
|
||||||
|
LOGGER.Debug("Saved attachment [{0}].", oAttachment)
|
||||||
|
oSuccess = Insert_GI_File(oAttachment, oExtractedAttachmentMarker)
|
||||||
|
|
||||||
|
If oSuccess = False Then
|
||||||
|
LOGGER.Warn("Saving attachment to disk failed: [{0}]", oAttachment)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return oSuccess
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Warn("Saving email to disk failed (Email_Decay)")
|
||||||
|
LOGGER.Error(ex)
|
||||||
|
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Shared Function Email_Decay(msgname As String, Optional FW As Boolean = False)
|
Private Shared Function Email_Decay(msgname As String, Optional FW As Boolean = False)
|
||||||
Try
|
Try
|
||||||
Dim msgonly As String = "|MSGONLY|"
|
Dim msgonly As String = "|MSGONLY|"
|
||||||
@@ -64,10 +119,10 @@ Public Class ClassFilehandle
|
|||||||
Dim erfolgreich As Boolean = False
|
Dim erfolgreich As Boolean = False
|
||||||
Dim msg As New Msg.Message(msgname)
|
Dim msg As New Msg.Message(msgname)
|
||||||
|
|
||||||
If Not msg.InternetMessageId Is Nothing Then
|
If msg.InternetMessageId IsNot Nothing Then
|
||||||
CURRENT_MESSAGEID = msg.InternetMessageId
|
CURRENT_MESSAGEID = msg.InternetMessageId
|
||||||
Else
|
Else
|
||||||
LOGGER.Info(">> Email_Decay: Es konnte keine Message-ID gelesen werden. Eine GUID wird erzeugt!")
|
LOGGER.Info("Es konnte keine Message-ID gelesen werden. Eine GUID wird erzeugt!")
|
||||||
Dim sGUID As String
|
Dim sGUID As String
|
||||||
sGUID = System.Guid.NewGuid.ToString()
|
sGUID = System.Guid.NewGuid.ToString()
|
||||||
CURRENT_MESSAGEID = sGUID
|
CURRENT_MESSAGEID = sGUID
|
||||||
@@ -109,6 +164,7 @@ Public Class ClassFilehandle
|
|||||||
|
|
||||||
If tempfile <> String.Empty Then
|
If tempfile <> String.Empty Then
|
||||||
Dim oMessage = attachment.EmbeddedMessage
|
Dim oMessage = attachment.EmbeddedMessage
|
||||||
|
oMessage.IsEmbedded = False
|
||||||
oMessage.Save(tempfile)
|
oMessage.Save(tempfile)
|
||||||
TEMP_FILES.Add(tempfile)
|
TEMP_FILES.Add(tempfile)
|
||||||
LOGGER.Info(">> Attachment (" & i1 & "):" & tempfile)
|
LOGGER.Info(">> Attachment (" & i1 & "):" & tempfile)
|
||||||
@@ -190,7 +246,7 @@ Public Class ClassFilehandle
|
|||||||
Try
|
Try
|
||||||
Dim version As Integer = 1
|
Dim version As Integer = 1
|
||||||
|
|
||||||
Dim Stammname As String = Path.GetDirectoryName(Dateiname) & "\" & Path.GetFileNameWithoutExtension(Dateiname)
|
Dim Stammname As String = Path.GetDirectoryName(Dateiname) & "\" & Path.GetFileNameWithoutExtension(Dateiname).Trim()
|
||||||
extension = Path.GetExtension(Dateiname)
|
extension = Path.GetExtension(Dateiname)
|
||||||
|
|
||||||
Dim _neuername As String = Stammname
|
Dim _neuername As String = Stammname
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Imports DigitalData.Modules.Logging
|
|||||||
Imports DigitalData.Modules.Config
|
Imports DigitalData.Modules.Config
|
||||||
Imports DigitalData.Modules.Windream
|
Imports DigitalData.Modules.Windream
|
||||||
Imports DigitalData.Modules.Filesystem
|
Imports DigitalData.Modules.Filesystem
|
||||||
|
Imports DigitalData.Modules.Messaging
|
||||||
|
|
||||||
Public Class ClassInit
|
Public Class ClassInit
|
||||||
Public _lizenzManager As ClassLicenseManager
|
Public _lizenzManager As ClassLicenseManager
|
||||||
@@ -67,6 +68,7 @@ Public Class ClassInit
|
|||||||
configResult = Load_BasicConfig()
|
configResult = Load_BasicConfig()
|
||||||
|
|
||||||
FILESYSTEM = New File(LOGCONFIG)
|
FILESYSTEM = New File(LOGCONFIG)
|
||||||
|
EMAIL = New Email2(LOGCONFIG)
|
||||||
|
|
||||||
If configResult = False Then
|
If configResult = False Then
|
||||||
If USER_LANGUAGE = "de-DE" Then
|
If USER_LANGUAGE = "de-DE" Then
|
||||||
|
|||||||
@@ -175,6 +175,9 @@
|
|||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="DigitalData.Modules.Messaging">
|
||||||
|
<HintPath>..\..\DDMonorepo\Modules.Messaging\bin\Debug\DigitalData.Modules.Messaging.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Windows">
|
<Reference Include="DigitalData.Modules.Windows">
|
||||||
<HintPath>..\..\DDMonorepo\Windows\bin\Debug\DigitalData.Modules.Windows.dll</HintPath>
|
<HintPath>..\..\DDMonorepo\Windows\bin\Debug\DigitalData.Modules.Windows.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -198,6 +201,10 @@
|
|||||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOTOOLLib.dll</HintPath>
|
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOTOOLLib.dll</HintPath>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Mail, Version=3.0.21189.1553, Culture=neutral, PublicKeyToken=6dc438ab78a525b3, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Limilabs\Mail.dll\Mail.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.7.10\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.7.10\lib\net45\NLog.dll</HintPath>
|
||||||
@@ -471,6 +478,7 @@
|
|||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmIndexFileList.en-US.resx">
|
<EmbeddedResource Include="frmIndexFileList.en-US.resx">
|
||||||
<DependentUpon>frmIndexFileList.vb</DependentUpon>
|
<DependentUpon>frmIndexFileList.vb</DependentUpon>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmIndexFileList.en.resx">
|
<EmbeddedResource Include="frmIndexFileList.en.resx">
|
||||||
<DependentUpon>frmIndexFileList.vb</DependentUpon>
|
<DependentUpon>frmIndexFileList.vb</DependentUpon>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Imports DigitalData.Modules.Config
|
Imports DigitalData.Modules.Config
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Modules.Filesystem
|
Imports DigitalData.Modules.Filesystem
|
||||||
|
Imports DigitalData.Modules.Messaging
|
||||||
|
|
||||||
Module ModuleCURRENT
|
Module ModuleCURRENT
|
||||||
Public ERROR_STATE As String
|
Public ERROR_STATE As String
|
||||||
@@ -16,6 +17,7 @@ Module ModuleCURRENT
|
|||||||
Public LOGCONFIG As LogConfig
|
Public LOGCONFIG As LogConfig
|
||||||
Public LOGGER As Logger
|
Public LOGGER As Logger
|
||||||
Public FILESYSTEM As File
|
Public FILESYSTEM As File
|
||||||
|
Public EMAIL As Email2
|
||||||
|
|
||||||
Public CURRENT_DOKART_ID As Integer
|
Public CURRENT_DOKART_ID As Integer
|
||||||
Public CURRENT_DOKART_DUPLICATE_HANDLING As String = "Default"
|
Public CURRENT_DOKART_DUPLICATE_HANDLING As String = "Default"
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ Imports DigitalData.Modules.Logging
|
|||||||
Imports DigitalData.Controls.LookupGrid
|
Imports DigitalData.Controls.LookupGrid
|
||||||
Imports DigitalData.GUIs.GlobalIndexer
|
Imports DigitalData.GUIs.GlobalIndexer
|
||||||
Imports DevExpress.XtraEditors.Controls
|
Imports DevExpress.XtraEditors.Controls
|
||||||
|
Imports Limilabs.Mail
|
||||||
|
Imports Limilabs.Mail.Headers
|
||||||
|
|
||||||
Public Class frmIndex
|
Public Class frmIndex
|
||||||
#Region "+++++ Variablen ++++++"
|
#Region "+++++ Variablen ++++++"
|
||||||
@@ -835,13 +837,13 @@ Public Class frmIndex
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
If DropType = "|OUTLOOK_MESSAGE|" Or DropType = "|FW_MSGONLY|" Or DropType = "|MSGONLY|" Or CURRENT_NEWFILENAME.EndsWith(".msg") Then
|
If DropType = "|OUTLOOK_MESSAGE|" Or DropType = "|FW_MSGONLY|" Or DropType = "|MSGONLY|" Or CURRENT_NEWFILENAME.EndsWith(".msg") Then
|
||||||
indexierung_erfolgreich = SetEmailIndices()
|
indexierung_erfolgreich = SetEmailIndicies(pIndexAttachment:=False)
|
||||||
If indexierung_erfolgreich = False Then
|
If indexierung_erfolgreich = False Then
|
||||||
MsgBox("Error in SetEmailIndices - See log", MsgBoxStyle.Critical)
|
MsgBox("Error in SetEmailIndices - See log", MsgBoxStyle.Critical)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
ElseIf DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then
|
ElseIf DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then
|
||||||
indexierung_erfolgreich = SetAttachmentIndices()
|
indexierung_erfolgreich = SetEmailIndicies(pIndexAttachment:=True)
|
||||||
If indexierung_erfolgreich = False Then
|
If indexierung_erfolgreich = False Then
|
||||||
MsgBox("Error in SetEmailIndices - See log", MsgBoxStyle.Critical)
|
MsgBox("Error in SetEmailIndices - See log", MsgBoxStyle.Critical)
|
||||||
Return False
|
Return False
|
||||||
@@ -866,9 +868,79 @@ Public Class frmIndex
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function SetEmailIndices()
|
Private Function SetEmailIndicies(pIndexAttachment As Boolean) As Boolean
|
||||||
|
Try
|
||||||
|
Dim oMsgFilePath As String = Path.Combine("\\windream\objects", CURRENT_NEWFILENAME)
|
||||||
|
Dim oEmlFilePath As String = EMAIL.Convert_MsgToEml(oMsgFilePath)
|
||||||
|
Dim oMail As IMail = EMAIL.Load_Email(oEmlFilePath)
|
||||||
|
|
||||||
|
Dim oSQL As String = $"SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = '{CURR_DOKART_OBJECTTYPE}'"
|
||||||
|
Dim oTable As DataTable = ClassDatabase.Return_Datatable(oSQL)
|
||||||
|
|
||||||
|
If IsNothing(oTable) Then
|
||||||
|
_Logger.Info("Could not get Email Indicies for DocType = [{0}]. Exiting.", CURR_DOKART_OBJECTTYPE)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If oTable.Rows.Count = 0 Then
|
||||||
|
LOGGER.Warn("Could not get Email Indicies for DocType = [{0}]. Exiting.")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If oTable.Rows.Count > 1 Then
|
||||||
|
LOGGER.Warn("Got multiple rows for Email Indicies for DocType = [{0}]. Exiting.")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oMessageId As String = oMail.MessageID
|
||||||
|
Dim oMessageFrom As String = oMail.From.First?.Address
|
||||||
|
Dim oMessageTo As String = DirectCast(oMail.To.First, MailBox)?.Address
|
||||||
|
Dim oSubject As String = oMail.Subject
|
||||||
|
Dim oDateIn As Date = oMail.Date
|
||||||
|
|
||||||
|
Dim oRow As DataRow = oTable.Rows.Item(0)
|
||||||
|
Dim oIndexNames As New Dictionary(Of String, Object) From {
|
||||||
|
{"IDX_EMAIL_ID", oMessageId},
|
||||||
|
{"IDX_EMAIL_FROM", oMessageFrom},
|
||||||
|
{"IDX_EMAIL_TO", oMessageTo},
|
||||||
|
{"IDX_EMAIL_SUBJECT", oSubject},
|
||||||
|
{"IDX_EMAIL_DATE_IN", oDateIn}
|
||||||
|
}
|
||||||
|
|
||||||
|
If pIndexAttachment = True Then
|
||||||
|
oIndexNames.Add("IDX_CHECK_ATTACHMENT", True)
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each oIndex In oIndexNames
|
||||||
|
Try
|
||||||
|
If oIndex.Value Is Nothing OrElse oIndex.Value = String.Empty Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oIndexingSuccessful = WriteIndex2File(oRow.Item(oIndex.Key), oIndex.Value)
|
||||||
|
'Die aktuelle Message-ID zwischenspeichern
|
||||||
|
CURRENT_MESSAGEID = oMessageId
|
||||||
|
If oIndexingSuccessful = False Then
|
||||||
|
MsgBox("Error in SetEmailIndices-EmailID - See log", MsgBoxStyle.Critical)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Error(ex)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Error(ex)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function SetEmailIndicesOld()
|
||||||
Dim indexierung_erfolgreich As Boolean = False
|
Dim indexierung_erfolgreich As Boolean = False
|
||||||
Dim _step As String = "1"
|
Dim _step As String = "1"
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim oTempPath As String = Path.Combine("\\windream\objects", CURRENT_NEWFILENAME)
|
Dim oTempPath As String = Path.Combine("\\windream\objects", CURRENT_NEWFILENAME)
|
||||||
Dim msg As Msg.Message = New Msg.Message(oTempPath)
|
Dim msg As Msg.Message = New Msg.Message(oTempPath)
|
||||||
@@ -995,7 +1067,6 @@ Public Class frmIndex
|
|||||||
_step = "5"
|
_step = "5"
|
||||||
_Logger.Info("emailTo and From Extraction via messageheader.")
|
_Logger.Info("emailTo and From Extraction via messageheader.")
|
||||||
emailFrom = ClassEmailHeaderExtractor.extractFromHeader(headers, fromPattern) 'FromRegexList)
|
emailFrom = ClassEmailHeaderExtractor.extractFromHeader(headers, fromPattern) 'FromRegexList)
|
||||||
|
|
||||||
emailTo = ClassEmailHeaderExtractor.extractFromHeader(headers, toPattern) ' extractToAddress(headers, ToRegexList)
|
emailTo = ClassEmailHeaderExtractor.extractFromHeader(headers, toPattern) ' extractToAddress(headers, ToRegexList)
|
||||||
|
|
||||||
'Handler für leere emailTo-Adresse
|
'Handler für leere emailTo-Adresse
|
||||||
@@ -1037,6 +1108,7 @@ Public Class frmIndex
|
|||||||
emailTo = ClassEmailHeaderExtractor.extractFromHeader(emailTo, finalize_pattern)
|
emailTo = ClassEmailHeaderExtractor.extractFromHeader(emailTo, finalize_pattern)
|
||||||
emailFrom = ClassEmailHeaderExtractor.extractFromHeader(emailFrom, finalize_pattern)
|
emailFrom = ClassEmailHeaderExtractor.extractFromHeader(emailFrom, finalize_pattern)
|
||||||
_step = "6.1"
|
_step = "6.1"
|
||||||
|
|
||||||
If Not IsNothing(emailFrom) Then
|
If Not IsNothing(emailFrom) Then
|
||||||
emailFrom = emailFrom.Replace("<", "")
|
emailFrom = emailFrom.Replace("<", "")
|
||||||
emailFrom = emailFrom.Replace(">", "")
|
emailFrom = emailFrom.Replace(">", "")
|
||||||
|
|||||||
Reference in New Issue
Block a user