MS
This commit is contained in:
@@ -24,6 +24,7 @@ Public Class ClassCurrent
|
||||
Public Shared MAIL_USER As String = ""
|
||||
Public Shared MAIL_USER_PW As String = ""
|
||||
Public Shared MAIL_PORT As Integer = 995
|
||||
Public Shared MAIL_INBOX_NAME As String = "Inbox"
|
||||
Public Shared DT_POLL_PROCESS As DataTable
|
||||
Public Shared DT_STEPS As DataTable
|
||||
Public Shared DT_INDEXING_STEPS As DataTable
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -126,74 +126,100 @@ DigitalData.Modules.Database
|
||||
<param name="Connection">The Firebird connection to use</param>
|
||||
<returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.Firebird.GetDatatable(System.String,DigitalData.Modules.Database.Firebird.TransactionMode)">
|
||||
<member name="M:DigitalData.Modules.Database.Firebird.GetDatatable(System.String,DigitalData.Modules.Database.Firebird.TransactionMode,FirebirdSql.Data.FirebirdClient.FbTransaction)">
|
||||
<summary>
|
||||
Executes a sql query resulting in a table of values.
|
||||
</summary>
|
||||
<param name="SqlQuery">The query to execute</param>
|
||||
<returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.Oracle.GetDatatable(System.String,System.Int32)">
|
||||
<member name="M:DigitalData.Modules.Database.ODBC.ExecuteNonQueryWithConnection(System.String,System.Data.Odbc.OdbcConnection)">
|
||||
<summary>
|
||||
Executes a non-query command.
|
||||
</summary>
|
||||
<param name="SqlQuery">The command to execute</param>
|
||||
<param name="Connection">The Firebird connection to use</param>
|
||||
<returns>True, if command was executed sucessfully. Otherwise false.</returns>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.ODBC.ExecuteNonQuery(System.String)">
|
||||
<summary>
|
||||
Executes a non-query command.
|
||||
</summary>
|
||||
<param name="SqlCommand">The command to execute</param>
|
||||
<returns>True, if command was executed sucessfully. Otherwise false.</returns>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.ODBC.GetScalarValueWithConnection(System.String,System.Data.Odbc.OdbcConnection)">
|
||||
<summary>
|
||||
Executes a sql query resulting in a scalar value.
|
||||
</summary>
|
||||
<param name="SqlQuery">The query to execute</param>
|
||||
<param name="Connection">The Firebird connection to use</param>
|
||||
<returns>The scalar value if the command was executed successfully. Nothing otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.ODBC.GetScalarValue(System.String)">
|
||||
<summary>
|
||||
Executes a sql query resulting in a table of values.
|
||||
</summary>
|
||||
<param name="SqlQuery">The query to execute</param>
|
||||
<returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.ODBC.GetDatatableWithConnection(System.String,System.Data.Odbc.OdbcConnection)">
|
||||
<summary>
|
||||
Executes a sql query resulting in a table of values.
|
||||
</summary>
|
||||
<param name="SqlQuery">The query to execute</param>
|
||||
<param name="Connection">The Firebird connection to use</param>
|
||||
<returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.ODBC.GetDatatable(System.String)">
|
||||
<summary>
|
||||
Executes a sql query resulting in a table of values.
|
||||
</summary>
|
||||
<param name="SqlQuery">The query to execute</param>
|
||||
<returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.Oracle.GetDatatable(System.String)">
|
||||
<summary>
|
||||
Returns a datatable for a sql-statement
|
||||
</summary>
|
||||
<param name="sqlcommand">sqlcommand for datatable (select XYZ from TableORView)</param>
|
||||
<param name="commandtimeout">Optional Timeout</param>
|
||||
<returns>Returns a datatable</returns>
|
||||
<remarks></remarks>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.Oracle.NewExecutenonQuery(System.String,System.Int32)">
|
||||
<member name="M:DigitalData.Modules.Database.Oracle.NewExecutenonQuery(System.String)">
|
||||
<summary>
|
||||
Executes the passed sql-statement
|
||||
</summary>
|
||||
<param name="executeStatement">the sql statement</param>
|
||||
<param name="commandtimeout">Optional Timeout</param>
|
||||
<returns>Returns true if properly executed, else false</returns>
|
||||
<remarks></remarks>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.Oracle.NewExecuteNonQueryAsync(System.String,System.Int32)">
|
||||
<summary>
|
||||
Executes the passed sql-statement in asyncmode
|
||||
</summary>
|
||||
<param name="executeStatement">the sql statement</param>
|
||||
<param name="commandtimeout">Optional Timeout</param>
|
||||
<remarks></remarks>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.Oracle.NewExecuteScalar(System.String,System.Int32)">
|
||||
<member name="M:DigitalData.Modules.Database.Oracle.NewExecuteScalar(System.String)">
|
||||
<summary>
|
||||
Executes the passed sql-statement as Scalar
|
||||
</summary>
|
||||
<param name="executeStatement">the sql statement</param>
|
||||
<param name="commandtimeout">Optional Timeout</param>
|
||||
<returns>Returns true if properly executed, else false</returns>
|
||||
<remarks></remarks>
|
||||
<returns>Returns the scalarvalue</returns>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.MSSQLServer.GetDatatable(System.String,System.Int32)">
|
||||
<summary>
|
||||
Returns a datatable for a sql-statement
|
||||
</summary>
|
||||
<param name="sqlcommand">sqlcommand for datatable (select XYZ from TableORView)</param>
|
||||
<param name="Timeout">Optional Timeout</param>
|
||||
<param name="SqlCommand">sqlcommand for datatable (select XYZ from TableORView)</param>
|
||||
<returns>Returns a datatable</returns>
|
||||
<remarks></remarks>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecutenonQuery(System.String,System.Int32)">
|
||||
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecutenonQuery(System.String)">
|
||||
<summary>
|
||||
Executes the passed sql-statement
|
||||
</summary>
|
||||
<param name="executeStatement">the sql statement</param>
|
||||
<param name="Timeout">Optional Timeout</param>
|
||||
<returns>Returns true if properly executed, else false</returns>
|
||||
<remarks></remarks>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteScalar(System.String,System.Int32)">
|
||||
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteScalar(System.String)">
|
||||
<summary>
|
||||
Executes the passed sql-statement as Scalar
|
||||
</summary>
|
||||
<param name="ScalarSQL">the sql statement</param>
|
||||
<param name="Timeout">Optional Timeout</param>
|
||||
<returns>Returns true if properly executed, else false</returns>
|
||||
<remarks></remarks>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteNonQueryAsync(System.String,System.Int32)">
|
||||
<summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -24,7 +24,7 @@ DigitalData.Modules.Logging
|
||||
</member>
|
||||
<member name="T:DigitalData.Modules.Logging.LogConfig">
|
||||
<module>LogConfig</module>
|
||||
<version>0.0.0.7</version>
|
||||
<version>0.0.1.0</version>
|
||||
<date>02.10.2018</date>
|
||||
<summary>
|
||||
Module that writes file-logs to different locations:
|
||||
@@ -125,6 +125,13 @@ DigitalData.Modules.Logging
|
||||
</summary>
|
||||
<returns>True, if debug log will be written. False otherwise.</returns>
|
||||
</member>
|
||||
<member name="P:DigitalData.Modules.Logging.LogConfig.Logs">
|
||||
<summary>
|
||||
Returns Logs in Memory as List(Of String) if Debug is enabled
|
||||
Returns an empty list if debug is disabled
|
||||
</summary>
|
||||
<returns>A list of log messages</returns>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Logging.LogConfig.#ctor(DigitalData.Modules.Logging.LogConfig.PathType,System.String,System.String)">
|
||||
<summary>
|
||||
Initializes a new LogConfig object with a logpath and optinally a filename-suffix.
|
||||
@@ -146,6 +153,11 @@ DigitalData.Modules.Logging
|
||||
<param name="ClassName">The name of the class the logger belongs to</param>
|
||||
<returns>An object of Logging.Logger</returns>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Logging.LogConfig.ClearLogs">
|
||||
<summary>
|
||||
Clears the internal log
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DigitalData.Modules.Logging.LogConfig.GetClassFullName">
|
||||
<summary>
|
||||
Gets the fully qualified name of the class invoking the calling method,
|
||||
|
||||
@@ -18,38 +18,7 @@ Public Class clsEmailIMAP
|
||||
' Logger.Info(e.Log)
|
||||
'End Sub
|
||||
|
||||
'Public Function TestIMAPLogin(Server As String, Port As Integer, Username As String, Password As String, Inbox As String) As Boolean
|
||||
' Logger.Debug("Testing Login to Server {0}:{1} with user {2}", Server, Port, Username)
|
||||
|
||||
' Try
|
||||
' Logger.Debug("Connecting...")
|
||||
' Using oClient As New S22.Imap.ImapClient(Server, Port, Username, Password, S22.Imap.AuthMethod.Login, True)
|
||||
' If Not oClient.Authed Then
|
||||
' Logger.Warn("Connected to server but authentication failed.")
|
||||
' Return False
|
||||
' End If
|
||||
' Logger.Debug("Connection successful")
|
||||
|
||||
' Logger.Debug("Fetching MessageIds..")
|
||||
' Dim oMessageIds As IEnumerable(Of UInteger) = oClient.Search(S22.Imap.SearchCondition.Unseen, Inbox)
|
||||
|
||||
' Logger.Debug("Found {0} messages", oMessageIds.Count)
|
||||
' Logger.Debug("Fetching messages...")
|
||||
|
||||
' Dim oMessages As IEnumerable(Of Mail.MailMessage) = oClient.GetMessages(oMessageIds, False, Inbox)
|
||||
' Logger.Debug("Messages fetched")
|
||||
|
||||
' oClient.Dispose()
|
||||
|
||||
' Return True
|
||||
' End Using
|
||||
' Catch ex As Exception
|
||||
' Logger.Error(ex)
|
||||
' Return False
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
Public Function FetchIMAPMessages(Server As String, Port As Integer, Username As String, Password As String, Inbox As String, Optional IsTest As Boolean = False) As Boolean
|
||||
Public Function FetchIMAPMessages(Server As String, Port As Integer, Username As String, Password As String, Inbox As String, Optional IsTest As Boolean = False, Optional DeleteinTest As Boolean = False, Optional MoveMailTo As String = "") As Boolean
|
||||
Logger.Debug("Connecting to Server {0}:{1} with user {2}", Server, Port, Username)
|
||||
|
||||
Try
|
||||
@@ -61,27 +30,50 @@ Public Class clsEmailIMAP
|
||||
End If
|
||||
Logger.Debug("Connection successful")
|
||||
|
||||
Logger.Debug("Fetching MessageIds..")
|
||||
Logger.Debug($"Fetching unseen MessageIds from Inbox: {Inbox}")
|
||||
Dim oMessageIds As IEnumerable(Of UInteger) = oClient.Search(S22.Imap.SearchCondition.Unseen, Inbox)
|
||||
|
||||
Logger.Debug("Found {0} messages", oMessageIds.Count)
|
||||
Logger.Debug("Fetching messages...")
|
||||
|
||||
For Each oMessageId As UInteger In oMessageIds
|
||||
Logger.Debug($"Checking message")
|
||||
Dim oMessage = oClient.GetMessage(oMessageId, False, Inbox)
|
||||
Logger.Debug($"Checking message Subject: {oMessage.Subject}, From: {oMessage.From}")
|
||||
|
||||
Dim oTempPath = Path.GetTempFileName()
|
||||
Dim oResult = WriteMessageToFile(oMessage, oTempPath)
|
||||
Dim oCount As Integer = 0
|
||||
Dim oMsg As New Message(oTempPath)
|
||||
|
||||
oCount &= 1
|
||||
If IsTest = False Then
|
||||
MAIL_LIST.Add(oMsg)
|
||||
Else
|
||||
Logger.Info($"IMAP-Test Message#: {oCount} - Msgsubject is: {oMsg.Subject}")
|
||||
Logger.Debug($"IMAP-Test Message#: {oCount} - Msgsubject is: {oMsg.Subject} - MsgMessageID is: {oMsg.MessageID}")
|
||||
Logger.Debug($"message correctly fetched. Mail has been downloaded to {oTempPath}")
|
||||
End If
|
||||
|
||||
Try
|
||||
If DeleteinTest = True Then
|
||||
Logger.Debug($"Message shall be deleted...")
|
||||
oClient.DeleteMessage(oMessageId,)
|
||||
Logger.Debug($"Message has been deleted!")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Message could not be deleted: " & ex.Message)
|
||||
End Try
|
||||
|
||||
Try
|
||||
If MoveMailTo <> "" Then
|
||||
Logger.Debug($"Moving to [{MoveMailTo}] is active...")
|
||||
oClient.MoveMessage(oMessageId, MoveMailTo)
|
||||
Logger.Debug($"Successfully moved!")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Message could not be moved: " & ex.Message)
|
||||
End Try
|
||||
Try
|
||||
If IsTest = False Then
|
||||
File.Delete(oTempPath)
|
||||
@@ -92,8 +84,8 @@ Public Class clsEmailIMAP
|
||||
Logger.Warn("Temp file could not be deleted")
|
||||
End Try
|
||||
Next
|
||||
|
||||
Logger.Debug("Messages fetched")
|
||||
oClient.Expunge()
|
||||
Logger.Debug("Finished Message-Fetch")
|
||||
End Using
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
@@ -101,6 +93,78 @@ Public Class clsEmailIMAP
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Shared Sub OnWriteLog(ByVal sender As Object, ByVal e As WriteLogEventArgs)
|
||||
Console.Write(e.Log)
|
||||
End Sub
|
||||
Public Function FetchIMAPMessagesIsoft(Server As String, Port As Integer, Username As String, Password As String, Inbox As String, Optional IsTest As Boolean = False, Optional DeleteinTest As Boolean = False, Optional MoveMailTo As String = "", Optional IsoftLog As String = "")
|
||||
Try
|
||||
Logger.Debug(String.Format("Working on IMAP_COLLECT Independentsoft..."))
|
||||
Dim oClient As New Independentsoft.Email.Imap.ImapClient(Server, Port)
|
||||
If IsoftLog <> "" Then
|
||||
Dim iLogger As New Independentsoft.Email.Logger(IsoftLog)
|
||||
AddHandler iLogger.WriteLog, AddressOf OnWriteLog
|
||||
oClient.Logger = iLogger
|
||||
End If
|
||||
|
||||
oClient.EnableSsl = True
|
||||
oClient.ValidateRemoteCertificate = False
|
||||
oClient.Connect()
|
||||
Try
|
||||
oClient.Login(Username, Password, AuthenticationType.Login)
|
||||
Catch ex As Exception
|
||||
Try
|
||||
oClient.Login(Username, Password, AuthenticationType.Ntlm)
|
||||
Catch ex1 As Exception
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Try
|
||||
Logger.Debug("Logged in...")
|
||||
oClient.SelectFolder(Inbox)
|
||||
Dim oEnvelopes As Independentsoft.Email.Imap.Envelope() = oClient.ListMessages()
|
||||
Dim oCount As Integer = 0
|
||||
For i As Integer = 0 To oEnvelopes.Length - 1
|
||||
If Not IsNothing(oEnvelopes(i).Subject) Then
|
||||
'If envelopes(i).Subject.ToString.ToUpper.Contains("[PROCESSMANAGER]") Or envelopes(i).Subject.ToString.ToUpper.Contains("[ADDI]") Then
|
||||
Logger.Info($"Working on email: UniqueID: {oEnvelopes(i).UniqueID} - Subject:{oEnvelopes(i).Subject} - Date {oEnvelopes(i).Date.ToString}")
|
||||
Dim oMessage As Mime.Message = oClient.GetMessage(oEnvelopes(i).UniqueID)
|
||||
If Not IsNothing(oMessage) Then
|
||||
oCount += 1
|
||||
MAIL_LIST.Add(oMessage)
|
||||
End If
|
||||
Try
|
||||
If DeleteinTest = True Then
|
||||
Logger.Debug($"Message shall be deleted...")
|
||||
oClient.Delete(oEnvelopes(i).UniqueID)
|
||||
Logger.Debug($"Message has been marked as deleted!")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Message could not be deleted: " & ex.Message)
|
||||
End Try
|
||||
Try
|
||||
If MoveMailTo <> "" Then
|
||||
Logger.Debug($"Moving to [{MoveMailTo}] is active...")
|
||||
oClient.AddMessage(MoveMailTo, oMessage)
|
||||
Logger.Debug($"Successfully moved!")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Message could not be moved: " & ex.Message)
|
||||
End Try
|
||||
End If
|
||||
|
||||
Next
|
||||
oClient.Expunge()
|
||||
oClient.Disconnect()
|
||||
' Logger.Debug($"{oCount.ToString} messages will be worked..")
|
||||
' Logger.Debug("IMAP_COLLECT finished!")
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex, "Unexpected Error in IMAP COLLECT Independentsoft:")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Uses a private API from MailWriter to write a MailMessage to disk.
|
||||
@@ -126,40 +190,6 @@ Public Class clsEmailIMAP
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
'Public Function IMAP_COLLECT()
|
||||
' Try
|
||||
' Logger.Info(String.Format("Working on IMAP_COLLECT....."))
|
||||
' Logger.Debug(String.Format("Working on IMAP_COLLECT....."))
|
||||
' Dim oClient As New Independentsoft.Email.Imap.ImapClient(MAIL_SERVER, MAIL_PORT)
|
||||
|
||||
' oClient.ValidateRemoteCertificate = False
|
||||
' oClient.Connect()
|
||||
' oClient.Login(MAIL_USER, MAIL_USER_PW)
|
||||
' oClient.SelectFolder("Inbox")
|
||||
' Dim oEnvelopes As Independentsoft.Email.Imap.Envelope() = oClient.ListMessages()
|
||||
' Dim oCount As Integer = 0
|
||||
' For i As Integer = 0 To oEnvelopes.Length - 1
|
||||
' If Not IsNothing(oEnvelopes(i).Subject) Then
|
||||
' 'If envelopes(i).Subject.ToString.ToUpper.Contains("[PROCESSMANAGER]") Or envelopes(i).Subject.ToString.ToUpper.Contains("[ADDI]") Then
|
||||
' Logger.Info($"Working on email: UniqueID: {oEnvelopes(i).UniqueID} - Subject:{oEnvelopes(i).Subject} - Date {oEnvelopes(i).Date.ToString}")
|
||||
' Dim oMessage As Mime.Message = oClient.GetMessage(oEnvelopes(i).UniqueID)
|
||||
' If Not IsNothing(oMessage) Then
|
||||
' oCount += 1
|
||||
' MAIL_LIST.Add(oMessage)
|
||||
' End If
|
||||
' 'End If
|
||||
' End If
|
||||
' Next
|
||||
' oClient.Disconnect()
|
||||
' Logger.Debug($"{oCount.ToString} messages will be worked..")
|
||||
' Logger.Debug("IMAP_COLLECT finished!")
|
||||
' Return True
|
||||
' Catch ex As Exception
|
||||
' Logger.Error(ex, "Unexpected Error in IMAP COLLECT:")
|
||||
' Return False
|
||||
' End Try
|
||||
'End Function
|
||||
'Public Function TEST_IMAP_COLLECT(INBOXNAME As String, MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String)
|
||||
' Try
|
||||
' Logger.Info(String.Format("Working on TEST_IMAP_COLLECT....."))
|
||||
|
||||
@@ -108,21 +108,18 @@ Public Class clsEmail
|
||||
Return True
|
||||
ElseIf CURRENT_POLL_TYPE = "IMAP" Then
|
||||
Try
|
||||
Dim oClient As New ImapClient(MAIL_SERVER, MAIL_PORT)
|
||||
'Using oClient As New S22.Imap.ImapClient(MAIL_SERVER, MAIL_PORT, MAIL_USER, MAIL_USER_PW, S22.Imap.AuthMethod.Login, True)
|
||||
' Dim oMessageIds As IEnumerable(Of UInteger) = oClient.Search(S22.Imap.SearchCondition.Unseen, MAIL_INBOX_NAME)
|
||||
' For Each oMessageId As UInteger In oMessageIds
|
||||
' If oMessageId = msgid Then
|
||||
' Logger.Debug($"DELETE_EMAILMessage shall be deleted...")
|
||||
' oClient.DeleteMessage(oMessageId)
|
||||
' Logger.Debug($"DELETE_EMAILMessage has been deleted!")
|
||||
' End If
|
||||
' Next
|
||||
' oClient.Expunge() 'delete messages marked as deleted
|
||||
|
||||
oClient.ValidateRemoteCertificate = False
|
||||
oClient.Connect()
|
||||
oClient.Login(MAIL_USER, MAIL_USER_PW)
|
||||
|
||||
oClient.SelectFolder("Inbox")
|
||||
Dim oEnvelopes As Envelope() = oClient.ListMessages()
|
||||
For i As Integer = 0 To oEnvelopes.Length - 1
|
||||
If oEnvelopes(i).MessageID = msgid Then
|
||||
oClient.Delete(oEnvelopes(i).UniqueID) 'mark as deleted
|
||||
End If
|
||||
Next
|
||||
oClient.Expunge() 'delete messages marked as deleted
|
||||
oClient.Disconnect()
|
||||
'End Using
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Error in IMAP Delete: " & ex.Message)
|
||||
|
||||
@@ -20,8 +20,8 @@ Public Class clsWorkEmail
|
||||
Try
|
||||
Logger = LogConf.GetLogger
|
||||
MyLogger = LogConf
|
||||
If LogConf.Debug = False Then
|
||||
Logger.Info("Detail-Log is on")
|
||||
If LogConf.Debug = True Then
|
||||
Logger.Info("DEBUG Active")
|
||||
End If
|
||||
_email = New clsEmail(LogConf)
|
||||
_DB_MSSQL = New clsDatabase(LogConf, ConStr)
|
||||
@@ -36,19 +36,24 @@ Public Class clsWorkEmail
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Public Function WORK_MAIL(msg As Message)
|
||||
Public Function WORK_MAIL(MyEmailMessage As Message)
|
||||
Try
|
||||
|
||||
Logger.Debug($"Starting WORK_MAIL...")
|
||||
CURRENT_MAIL_BODY_ALL = ""
|
||||
CURRENT_MAIL_BODY_ANSWER1 = ""
|
||||
CURRENT_MAIL_BODY_Substr2 = ""
|
||||
CURRENT_MAIL_MESSAGE = msg
|
||||
CURRENT_MAIL_SUBJECT = msg.Subject.ToUpper
|
||||
CURRENT_MAIL_MESSAGE = MyEmailMessage
|
||||
CURRENT_MAIL_SUBJECT = MyEmailMessage.Subject.ToUpper
|
||||
Logger.Debug($"Working on email from: {MyEmailMessage.From.EmailAddress}...")
|
||||
If IsNothing(CURRENT_MAIL_SUBJECT) Then
|
||||
CURRENT_MAIL_SUBJECT = ""
|
||||
Else
|
||||
Logger.Debug($"Subject: {CURRENT_MAIL_SUBJECT}...")
|
||||
End If
|
||||
|
||||
CURRENT_MAIL_FROM = msg.From.EmailAddress
|
||||
|
||||
CURRENT_MAIL_FROM = MyEmailMessage.From.EmailAddress
|
||||
Logger.Debug($"Working on email from : {CURRENT_MAIL_FROM}...")
|
||||
Dim oTempMailExists As Boolean = SAVE2TEMP()
|
||||
'Checking wether Mail can be opened
|
||||
Dim oTempMailAccessible As Boolean = False
|
||||
@@ -63,10 +68,10 @@ Public Class clsWorkEmail
|
||||
MessageError = False
|
||||
If CURRENT_MAIL_SUBJECT.Contains("[PROCESSMANAGER]") Then
|
||||
PROCESS_MANAGER_IN()
|
||||
ElseIf msg.Subject.Contains("[ADDI]") Then
|
||||
ElseIf MyEmailMessage.Subject.Contains("[ADDI]") Then
|
||||
|
||||
Else
|
||||
Logger.Debug(String.Format("No relation configured for this email - Subject[{0}]", msg.Subject))
|
||||
Logger.Info(String.Format("No relation configured for this email - Subject[{0}]", CURRENT_MAIL_SUBJECT))
|
||||
COMMON_EMAIL_IN()
|
||||
End If
|
||||
INSERT_HISTORY()
|
||||
|
||||
@@ -100,6 +100,7 @@ Public Class clsWorker
|
||||
MAIL_USER = row("EMAIL_USER")
|
||||
MAIL_USER_PW = row("EMAIL_PW")
|
||||
MAIL_PORT = row("PORT_IN")
|
||||
MAIL_INBOX_NAME = "Inbox"
|
||||
Logger.Debug(String.Format("{0}-{1}", MAIL_FROM, MAIL_SERVER))
|
||||
|
||||
Dim PWPlain = _wrapper.DecryptData(MAIL_USER_PW)
|
||||
@@ -129,7 +130,7 @@ Public Class clsWorker
|
||||
Case "IMAP"
|
||||
'pollresult = _emailIMAP.IMAP_COLLECT()
|
||||
' 09.04.19: Use S22.Imap instead of IndependentSoft ImapClient
|
||||
pollresult = _emailIMAP.FetchIMAPMessages(MAIL_SERVER, MAIL_PORT, MAIL_USER, MAIL_USER_PW, "Inbox")
|
||||
pollresult = _emailIMAP.FetchIMAPMessagesIsoft(MAIL_SERVER, MAIL_PORT, MAIL_USER, MAIL_USER_PW, MAIL_INBOX_NAME)
|
||||
End Select
|
||||
End If
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,6 @@
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.Resources.resources
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.vbproj.GenerateResource.cache
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.vbproj.CoreCompileInputs.cache
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin\Debug\DigitalData.EMLProfiler.dll.config
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin\Debug\DigitalData.EMLProfiler.dll
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin\Debug\DigitalData.EMLProfiler.pdb
|
||||
@@ -21,11 +24,7 @@ E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin\Debug\NLog.xml
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin\Debug\S22.Imap.xml
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin\Debug\FirebirdSql.Data.FirebirdClient.pdb
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.Resources.resources
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.vbproj.GenerateResource.cache
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.vbproj.CoreCompileInputs.cache
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.vbproj.CopyComplete
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.dll
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.xml
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.pdb
|
||||
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.vbprojAssemblyReference.cache
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user