This commit is contained in:
Digital Data - Marlon Schreiber 2019-09-20 14:19:37 +02:00
parent 25f8db19ad
commit d04c3ab202
50 changed files with 457 additions and 211 deletions

Binary file not shown.

View File

@ -126,74 +126,100 @@ DigitalData.Modules.Database
<param name="Connection">The Firebird connection to use</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> <returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns>
</member> </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> <summary>
Executes a sql query resulting in a table of values. Executes a sql query resulting in a table of values.
</summary> </summary>
<param name="SqlQuery">The query to execute</param> <param name="SqlQuery">The query to execute</param>
<returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns> <returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns>
</member> </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> <summary>
Returns a datatable for a sql-statement Returns a datatable for a sql-statement
</summary> </summary>
<param name="sqlcommand">sqlcommand for datatable (select XYZ from TableORView)</param> <param name="sqlcommand">sqlcommand for datatable (select XYZ from TableORView)</param>
<param name="commandtimeout">Optional Timeout</param>
<returns>Returns a datatable</returns> <returns>Returns a datatable</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.Oracle.NewExecutenonQuery(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.Oracle.NewExecutenonQuery(System.String)">
<summary> <summary>
Executes the passed sql-statement Executes the passed sql-statement
</summary> </summary>
<param name="executeStatement">the sql statement</param> <param name="executeStatement">the sql statement</param>
<param name="commandtimeout">Optional Timeout</param>
<returns>Returns true if properly executed, else false</returns> <returns>Returns true if properly executed, else false</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.Oracle.NewExecuteNonQueryAsync(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.Oracle.NewExecuteScalar(System.String)">
<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)">
<summary> <summary>
Executes the passed sql-statement as Scalar Executes the passed sql-statement as Scalar
</summary> </summary>
<param name="executeStatement">the sql statement</param> <param name="executeStatement">the sql statement</param>
<param name="commandtimeout">Optional Timeout</param> <returns>Returns the scalarvalue</returns>
<returns>Returns true if properly executed, else false</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.MSSQLServer.GetDatatable(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.MSSQLServer.GetDatatable(System.String,System.Int32)">
<summary> <summary>
Returns a datatable for a sql-statement Returns a datatable for a sql-statement
</summary> </summary>
<param name="sqlcommand">sqlcommand for datatable (select XYZ from TableORView)</param> <param name="SqlCommand">sqlcommand for datatable (select XYZ from TableORView)</param>
<param name="Timeout">Optional Timeout</param>
<returns>Returns a datatable</returns> <returns>Returns a datatable</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecutenonQuery(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecutenonQuery(System.String)">
<summary> <summary>
Executes the passed sql-statement Executes the passed sql-statement
</summary> </summary>
<param name="executeStatement">the sql statement</param> <param name="executeStatement">the sql statement</param>
<param name="Timeout">Optional Timeout</param>
<returns>Returns true if properly executed, else false</returns> <returns>Returns true if properly executed, else false</returns>
<remarks></remarks> <remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteScalar(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteScalar(System.String)">
<summary> <summary>
Executes the passed sql-statement as Scalar Executes the passed sql-statement as Scalar
</summary> </summary>
<param name="ScalarSQL">the sql statement</param> <param name="ScalarSQL">the sql statement</param>
<param name="Timeout">Optional Timeout</param>
<returns>Returns true if properly executed, else false</returns> <returns>Returns true if properly executed, else false</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteNonQueryAsync(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteNonQueryAsync(System.String,System.Int32)">
<summary> <summary>

View File

@ -24,7 +24,7 @@ DigitalData.Modules.Logging
</member> </member>
<member name="T:DigitalData.Modules.Logging.LogConfig"> <member name="T:DigitalData.Modules.Logging.LogConfig">
<module>LogConfig</module> <module>LogConfig</module>
<version>0.0.0.7</version> <version>0.0.1.0</version>
<date>02.10.2018</date> <date>02.10.2018</date>
<summary> <summary>
Module that writes file-logs to different locations: Module that writes file-logs to different locations:
@ -125,6 +125,13 @@ DigitalData.Modules.Logging
</summary> </summary>
<returns>True, if debug log will be written. False otherwise.</returns> <returns>True, if debug log will be written. False otherwise.</returns>
</member> </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)"> <member name="M:DigitalData.Modules.Logging.LogConfig.#ctor(DigitalData.Modules.Logging.LogConfig.PathType,System.String,System.String)">
<summary> <summary>
Initializes a new LogConfig object with a logpath and optinally a filename-suffix. 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> <param name="ClassName">The name of the class the logger belongs to</param>
<returns>An object of Logging.Logger</returns> <returns>An object of Logging.Logger</returns>
</member> </member>
<member name="M:DigitalData.Modules.Logging.LogConfig.ClearLogs">
<summary>
Clears the internal log
</summary>
</member>
<member name="M:DigitalData.Modules.Logging.LogConfig.GetClassFullName"> <member name="M:DigitalData.Modules.Logging.LogConfig.GetClassFullName">
<summary> <summary>
Gets the fully qualified name of the class invoking the calling method, Gets the fully qualified name of the class invoking the calling method,

View File

@ -0,0 +1,8 @@
2019-09-18 08:50:16|frmMain|DEBUG >> AppConfig is located at: [E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\CONFIG_APP\bin\Debug\CONFIG_APP.exe.Config]
2019-09-18 08:50:17|clsWindream_allgemein|DEBUG >> sDD-VMX02-APS01
2019-09-18 08:50:18|clsWindream_allgemein|DEBUG >> sDD-VMX02-APS01
2019-09-18 08:50:18|clsWindream_allgemein|DEBUG >> windream-Server: 'sDD-VMX02-APS01'
2019-09-18 08:50:18|clsWindream_allgemein|DEBUG >> windream-UserName: 'DIGITALDATA.LOCAL\SchreiberM'
2019-09-18 08:50:18|clsWindream_allgemein|DEBUG >> Alles OK - Erfolgreich angemeldet und Session aufgebaut
2019-09-18 08:50:18|frmMain|DEBUG >> SQL-Server ConnString is [Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd]
2019-09-18 08:50:18|clsDatabase|DEBUG >> ReturnDatatable Command: select * from TBEMLP_CONFIG

View File

@ -0,0 +1,5 @@
2019-09-18 08:52:43|clsEmailIMAP|ERROR >> Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat 217.110.227.196:25
bei System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)
bei S22.Imap.ImapClient.Connect(String hostname, Int32 port, Boolean ssl, RemoteCertificateValidationCallback validate)
bei S22.Imap.ImapClient..ctor(String hostname, Int32 port, String username, String password, AuthMethod method, Boolean ssl, RemoteCertificateValidationCallback validate)
bei DigitalData.EMLProfiler.clsEmailIMAP.FetchIMAPMessages(String Server, Int32 Port, String Username, String Password, String Inbox, Boolean IsTest) in E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\clsEmail.IMAP.vb:Zeile 57.

View File

@ -278,11 +278,16 @@ Partial Class frmMain
Me.ToolStripSeparator12 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripSeparator12 = New System.Windows.Forms.ToolStripSeparator()
Me.ToolStripButton34 = New System.Windows.Forms.ToolStripButton() Me.ToolStripButton34 = New System.Windows.Forms.ToolStripButton()
Me.TabPage3 = New System.Windows.Forms.TabPage() Me.TabPage3 = New System.Windows.Forms.TabPage()
Me.GroupBox5 = New System.Windows.Forms.GroupBox()
Me.Label16 = New System.Windows.Forms.Label()
Me.Button1 = New System.Windows.Forms.Button()
Me.chkDeleteMail = New System.Windows.Forms.CheckBox()
Me.txtMoveTo = New System.Windows.Forms.TextBox()
Me.Label15 = New System.Windows.Forms.Label()
Me.txtInboxname = New System.Windows.Forms.TextBox()
Me.Button6 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button()
Me.PORT_INTextBox = New System.Windows.Forms.TextBox() Me.PORT_INTextBox = New System.Windows.Forms.TextBox()
Me.Button2 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button()
Me.txtInboxname = New System.Windows.Forms.TextBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.txtTestmail = New System.Windows.Forms.TextBox() Me.txtTestmail = New System.Windows.Forms.TextBox()
Me.Label12 = New System.Windows.Forms.Label() Me.Label12 = New System.Windows.Forms.Label()
Me.btnsendtestmail = New System.Windows.Forms.Button() Me.btnsendtestmail = New System.Windows.Forms.Button()
@ -342,6 +347,7 @@ Partial Class frmMain
Me.TBEMLP_HISTORYTableAdapter = New CONFIG_APP.MyDatasetTableAdapters.TBEMLP_HISTORYTableAdapter() Me.TBEMLP_HISTORYTableAdapter = New CONFIG_APP.MyDatasetTableAdapters.TBEMLP_HISTORYTableAdapter()
Me.TBEMLP_CONFIGTableAdapter = New CONFIG_APP.MyDatasetTableAdapters.TBEMLP_CONFIGTableAdapter() Me.TBEMLP_CONFIGTableAdapter = New CONFIG_APP.MyDatasetTableAdapters.TBEMLP_CONFIGTableAdapter()
Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog() Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog()
Me.chkS22 = New System.Windows.Forms.CheckBox()
GUIDLabel = New System.Windows.Forms.Label() GUIDLabel = New System.Windows.Forms.Label()
PROFILE_NAMELabel = New System.Windows.Forms.Label() PROFILE_NAMELabel = New System.Windows.Forms.Label()
POLL_TYPELabel = New System.Windows.Forms.Label() POLL_TYPELabel = New System.Windows.Forms.Label()
@ -446,6 +452,7 @@ Partial Class frmMain
CType(Me.BindingNavigator5, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.BindingNavigator5, System.ComponentModel.ISupportInitialize).BeginInit()
Me.BindingNavigator5.SuspendLayout() Me.BindingNavigator5.SuspendLayout()
Me.TabPage3.SuspendLayout() Me.TabPage3.SuspendLayout()
Me.GroupBox5.SuspendLayout()
CType(Me.GridControl6, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridControl6, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridView6, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridView6, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.BindingNavigator6, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.BindingNavigator6, System.ComponentModel.ISupportInitialize).BeginInit()
@ -2896,12 +2903,11 @@ Partial Class frmMain
' '
'TabPage3 'TabPage3
' '
Me.TabPage3.Controls.Add(Me.GroupBox5)
Me.TabPage3.Controls.Add(Me.Button6) Me.TabPage3.Controls.Add(Me.Button6)
Me.TabPage3.Controls.Add(PORT_INLabel) Me.TabPage3.Controls.Add(PORT_INLabel)
Me.TabPage3.Controls.Add(Me.PORT_INTextBox) Me.TabPage3.Controls.Add(Me.PORT_INTextBox)
Me.TabPage3.Controls.Add(Me.Button2) Me.TabPage3.Controls.Add(Me.Button2)
Me.TabPage3.Controls.Add(Me.txtInboxname)
Me.TabPage3.Controls.Add(Me.Button1)
Me.TabPage3.Controls.Add(Me.txtTestmail) Me.TabPage3.Controls.Add(Me.txtTestmail)
Me.TabPage3.Controls.Add(Me.Label12) Me.TabPage3.Controls.Add(Me.Label12)
Me.TabPage3.Controls.Add(Me.btnsendtestmail) Me.TabPage3.Controls.Add(Me.btnsendtestmail)
@ -2942,6 +2948,77 @@ Partial Class frmMain
Me.TabPage3.Text = "EMail-Konto Konfiguration" Me.TabPage3.Text = "EMail-Konto Konfiguration"
Me.TabPage3.UseVisualStyleBackColor = True Me.TabPage3.UseVisualStyleBackColor = True
' '
'GroupBox5
'
Me.GroupBox5.Controls.Add(Me.chkS22)
Me.GroupBox5.Controls.Add(Me.Label16)
Me.GroupBox5.Controls.Add(Me.Button1)
Me.GroupBox5.Controls.Add(Me.chkDeleteMail)
Me.GroupBox5.Controls.Add(Me.txtMoveTo)
Me.GroupBox5.Controls.Add(Me.Label15)
Me.GroupBox5.Controls.Add(Me.txtInboxname)
Me.GroupBox5.Location = New System.Drawing.Point(374, 319)
Me.GroupBox5.Name = "GroupBox5"
Me.GroupBox5.Size = New System.Drawing.Size(457, 100)
Me.GroupBox5.TabIndex = 76
Me.GroupBox5.TabStop = False
Me.GroupBox5.Text = "IMAP Test"
'
'Label16
'
Me.Label16.AutoSize = True
Me.Label16.Location = New System.Drawing.Point(125, 34)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(70, 13)
Me.Label16.TabIndex = 76
Me.Label16.Text = "InBox-Name:"
'
'Button1
'
Me.Button1.Image = Global.CONFIG_APP.My.Resources.Resources.email_go
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(6, 20)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(117, 35)
Me.Button1.TabIndex = 68
Me.Button1.Text = "TEST_IMAP"
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button1.UseVisualStyleBackColor = True
'
'chkDeleteMail
'
Me.chkDeleteMail.AutoSize = True
Me.chkDeleteMail.Location = New System.Drawing.Point(309, 35)
Me.chkDeleteMail.Name = "chkDeleteMail"
Me.chkDeleteMail.Size = New System.Drawing.Size(80, 17)
Me.chkDeleteMail.TabIndex = 75
Me.chkDeleteMail.Text = "Lösche Mail"
Me.chkDeleteMail.UseVisualStyleBackColor = True
'
'txtMoveTo
'
Me.txtMoveTo.Location = New System.Drawing.Point(203, 58)
Me.txtMoveTo.Name = "txtMoveTo"
Me.txtMoveTo.Size = New System.Drawing.Size(200, 21)
Me.txtMoveTo.TabIndex = 73
'
'Label15
'
Me.Label15.AutoSize = True
Me.Label15.Location = New System.Drawing.Point(152, 61)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(49, 13)
Me.Label15.TabIndex = 74
Me.Label15.Text = "MoveTo:"
'
'txtInboxname
'
Me.txtInboxname.Location = New System.Drawing.Point(203, 31)
Me.txtInboxname.Name = "txtInboxname"
Me.txtInboxname.Size = New System.Drawing.Size(100, 21)
Me.txtInboxname.TabIndex = 69
Me.txtInboxname.Text = "Inbox"
'
'Button6 'Button6
' '
Me.Button6.Image = Global.CONFIG_APP.My.Resources.Resources.email_go Me.Button6.Image = Global.CONFIG_APP.My.Resources.Resources.email_go
@ -2966,7 +3043,7 @@ Partial Class frmMain
' '
Me.Button2.Image = Global.CONFIG_APP.My.Resources.Resources.email_go Me.Button2.Image = Global.CONFIG_APP.My.Resources.Resources.email_go
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button2.Location = New System.Drawing.Point(374, 321) Me.Button2.Location = New System.Drawing.Point(377, 425)
Me.Button2.Name = "Button2" Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(117, 35) Me.Button2.Size = New System.Drawing.Size(117, 35)
Me.Button2.TabIndex = 70 Me.Button2.TabIndex = 70
@ -2974,26 +3051,6 @@ Partial Class frmMain
Me.Button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.Button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button2.UseVisualStyleBackColor = True Me.Button2.UseVisualStyleBackColor = True
' '
'txtInboxname
'
Me.txtInboxname.Location = New System.Drawing.Point(496, 294)
Me.txtInboxname.Name = "txtInboxname"
Me.txtInboxname.Size = New System.Drawing.Size(100, 21)
Me.txtInboxname.TabIndex = 69
Me.txtInboxname.Text = "Inbox"
'
'Button1
'
Me.Button1.Image = Global.CONFIG_APP.My.Resources.Resources.email_go
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(373, 280)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(117, 35)
Me.Button1.TabIndex = 68
Me.Button1.Text = "TEST_IMAP"
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button1.UseVisualStyleBackColor = True
'
'txtTestmail 'txtTestmail
' '
Me.txtTestmail.BackColor = System.Drawing.SystemColors.Control Me.txtTestmail.BackColor = System.Drawing.SystemColors.Control
@ -3378,7 +3435,7 @@ Partial Class frmMain
Me.GroupBox4.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.GroupBox4.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.GroupBox4.Location = New System.Drawing.Point(8, 122) Me.GroupBox4.Location = New System.Drawing.Point(8, 122)
Me.GroupBox4.Name = "GroupBox4" Me.GroupBox4.Name = "GroupBox4"
Me.GroupBox4.Size = New System.Drawing.Size(1203, 396) Me.GroupBox4.Size = New System.Drawing.Size(1203, 0)
Me.GroupBox4.TabIndex = 68 Me.GroupBox4.TabIndex = 68
Me.GroupBox4.TabStop = False Me.GroupBox4.TabStop = False
Me.GroupBox4.Text = "Test RegEx" Me.GroupBox4.Text = "Test RegEx"
@ -3419,7 +3476,7 @@ Partial Class frmMain
Me.txtResultRegEx.Location = New System.Drawing.Point(659, 49) Me.txtResultRegEx.Location = New System.Drawing.Point(659, 49)
Me.txtResultRegEx.Multiline = True Me.txtResultRegEx.Multiline = True
Me.txtResultRegEx.Name = "txtResultRegEx" Me.txtResultRegEx.Name = "txtResultRegEx"
Me.txtResultRegEx.Size = New System.Drawing.Size(538, 341) Me.txtResultRegEx.Size = New System.Drawing.Size(538, 0)
Me.txtResultRegEx.TabIndex = 69 Me.txtResultRegEx.TabIndex = 69
' '
'txthtmlEmail 'txthtmlEmail
@ -3431,7 +3488,7 @@ Partial Class frmMain
Me.txthtmlEmail.Location = New System.Drawing.Point(9, 49) Me.txthtmlEmail.Location = New System.Drawing.Point(9, 49)
Me.txthtmlEmail.Multiline = True Me.txthtmlEmail.Multiline = True
Me.txthtmlEmail.Name = "txthtmlEmail" Me.txthtmlEmail.Name = "txthtmlEmail"
Me.txthtmlEmail.Size = New System.Drawing.Size(538, 341) Me.txthtmlEmail.Size = New System.Drawing.Size(538, 0)
Me.txthtmlEmail.TabIndex = 67 Me.txthtmlEmail.TabIndex = 67
Me.txthtmlEmail.Text = Global.CONFIG_APP.My.MySettings.Default.MyTestHTML Me.txthtmlEmail.Text = Global.CONFIG_APP.My.MySettings.Default.MyTestHTML
' '
@ -3509,6 +3566,16 @@ Partial Class frmMain
' '
Me.TBEMLP_CONFIGTableAdapter.ClearBeforeFill = True Me.TBEMLP_CONFIGTableAdapter.ClearBeforeFill = True
' '
'chkS22
'
Me.chkS22.AutoSize = True
Me.chkS22.Location = New System.Drawing.Point(6, 62)
Me.chkS22.Name = "chkS22"
Me.chkS22.Size = New System.Drawing.Size(44, 17)
Me.chkS22.TabIndex = 77
Me.chkS22.Text = "S22"
Me.chkS22.UseVisualStyleBackColor = True
'
'frmMain 'frmMain
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@ -3584,6 +3651,8 @@ Partial Class frmMain
Me.BindingNavigator5.PerformLayout() Me.BindingNavigator5.PerformLayout()
Me.TabPage3.ResumeLayout(False) Me.TabPage3.ResumeLayout(False)
Me.TabPage3.PerformLayout() Me.TabPage3.PerformLayout()
Me.GroupBox5.ResumeLayout(False)
Me.GroupBox5.PerformLayout()
CType(Me.GridControl6, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridControl6, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridView6, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridView6, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.BindingNavigator6, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.BindingNavigator6, System.ComponentModel.ISupportInitialize).EndInit()
@ -3859,4 +3928,10 @@ Partial Class frmMain
Friend WithEvents PORT_INTextBox As TextBox Friend WithEvents PORT_INTextBox As TextBox
Friend WithEvents lblDownloadPath As Label Friend WithEvents lblDownloadPath As Label
Friend WithEvents Button6 As Button Friend WithEvents Button6 As Button
Friend WithEvents Label15 As Label
Friend WithEvents txtMoveTo As TextBox
Friend WithEvents GroupBox5 As GroupBox
Friend WithEvents Label16 As Label
Friend WithEvents chkDeleteMail As CheckBox
Friend WithEvents chkS22 As CheckBox
End Class End Class

View File

@ -669,8 +669,14 @@ Public Class frmMain
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
My.Settings.Save() My.Settings.Save()
Dim PWPlain = _Encryption.DecryptData(EMAIL_PWTextBox.Text) Dim PWPlain = _Encryption.DecryptData(EMAIL_PWTextBox.Text)
'Logger.Debug($"PWis !{PWPlain}35452dd=")
Dim oResult
If chkS22.Checked Then
oResult = _emailIMAP.FetchIMAPMessages(EMAIL_SMTPTextBox.Text, PORT_INTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, txtInboxname.Text, True, chkDeleteMail.Checked, txtMoveTo.Text)
Else
oResult = _emailIMAP.FetchIMAPMessagesIsoft(EMAIL_SMTPTextBox.Text, PORT_INTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, txtInboxname.Text, True, chkDeleteMail.Checked, txtMoveTo.Text, Path.Combine(My.Application.Info.DirectoryPath, "Log") & "\IsoftLog.txt")
End If
Dim oResult = _emailIMAP.FetchIMAPMessages(EMAIL_SMTPTextBox.Text, PORT_INTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, txtInboxname.Text, True)
If oResult = False Then If oResult = False Then
MsgBox("Access Imap NOT successfull", MsgBoxStyle.Critical) MsgBox("Access Imap NOT successfull", MsgBoxStyle.Critical)
@ -828,4 +834,8 @@ Public Class frmMain
End If End If
End If End If
End Sub End Sub
Private Sub chkS22_CheckedChanged(sender As Object, e As EventArgs) Handles chkS22.CheckedChanged
End Sub
End Class End Class

View File

@ -24,6 +24,7 @@ Public Class ClassCurrent
Public Shared MAIL_USER As String = "" Public Shared MAIL_USER As String = ""
Public Shared MAIL_USER_PW As String = "" Public Shared MAIL_USER_PW As String = ""
Public Shared MAIL_PORT As Integer = 995 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_POLL_PROCESS As DataTable
Public Shared DT_STEPS As DataTable Public Shared DT_STEPS As DataTable
Public Shared DT_INDEXING_STEPS As DataTable Public Shared DT_INDEXING_STEPS As DataTable

View File

@ -126,74 +126,100 @@ DigitalData.Modules.Database
<param name="Connection">The Firebird connection to use</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> <returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns>
</member> </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> <summary>
Executes a sql query resulting in a table of values. Executes a sql query resulting in a table of values.
</summary> </summary>
<param name="SqlQuery">The query to execute</param> <param name="SqlQuery">The query to execute</param>
<returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns> <returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns>
</member> </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> <summary>
Returns a datatable for a sql-statement Returns a datatable for a sql-statement
</summary> </summary>
<param name="sqlcommand">sqlcommand for datatable (select XYZ from TableORView)</param> <param name="sqlcommand">sqlcommand for datatable (select XYZ from TableORView)</param>
<param name="commandtimeout">Optional Timeout</param>
<returns>Returns a datatable</returns> <returns>Returns a datatable</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.Oracle.NewExecutenonQuery(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.Oracle.NewExecutenonQuery(System.String)">
<summary> <summary>
Executes the passed sql-statement Executes the passed sql-statement
</summary> </summary>
<param name="executeStatement">the sql statement</param> <param name="executeStatement">the sql statement</param>
<param name="commandtimeout">Optional Timeout</param>
<returns>Returns true if properly executed, else false</returns> <returns>Returns true if properly executed, else false</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.Oracle.NewExecuteNonQueryAsync(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.Oracle.NewExecuteScalar(System.String)">
<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)">
<summary> <summary>
Executes the passed sql-statement as Scalar Executes the passed sql-statement as Scalar
</summary> </summary>
<param name="executeStatement">the sql statement</param> <param name="executeStatement">the sql statement</param>
<param name="commandtimeout">Optional Timeout</param> <returns>Returns the scalarvalue</returns>
<returns>Returns true if properly executed, else false</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.MSSQLServer.GetDatatable(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.MSSQLServer.GetDatatable(System.String,System.Int32)">
<summary> <summary>
Returns a datatable for a sql-statement Returns a datatable for a sql-statement
</summary> </summary>
<param name="sqlcommand">sqlcommand for datatable (select XYZ from TableORView)</param> <param name="SqlCommand">sqlcommand for datatable (select XYZ from TableORView)</param>
<param name="Timeout">Optional Timeout</param>
<returns>Returns a datatable</returns> <returns>Returns a datatable</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecutenonQuery(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecutenonQuery(System.String)">
<summary> <summary>
Executes the passed sql-statement Executes the passed sql-statement
</summary> </summary>
<param name="executeStatement">the sql statement</param> <param name="executeStatement">the sql statement</param>
<param name="Timeout">Optional Timeout</param>
<returns>Returns true if properly executed, else false</returns> <returns>Returns true if properly executed, else false</returns>
<remarks></remarks> <remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteScalar(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteScalar(System.String)">
<summary> <summary>
Executes the passed sql-statement as Scalar Executes the passed sql-statement as Scalar
</summary> </summary>
<param name="ScalarSQL">the sql statement</param> <param name="ScalarSQL">the sql statement</param>
<param name="Timeout">Optional Timeout</param>
<returns>Returns true if properly executed, else false</returns> <returns>Returns true if properly executed, else false</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteNonQueryAsync(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteNonQueryAsync(System.String,System.Int32)">
<summary> <summary>

View File

@ -24,7 +24,7 @@ DigitalData.Modules.Logging
</member> </member>
<member name="T:DigitalData.Modules.Logging.LogConfig"> <member name="T:DigitalData.Modules.Logging.LogConfig">
<module>LogConfig</module> <module>LogConfig</module>
<version>0.0.0.7</version> <version>0.0.1.0</version>
<date>02.10.2018</date> <date>02.10.2018</date>
<summary> <summary>
Module that writes file-logs to different locations: Module that writes file-logs to different locations:
@ -125,6 +125,13 @@ DigitalData.Modules.Logging
</summary> </summary>
<returns>True, if debug log will be written. False otherwise.</returns> <returns>True, if debug log will be written. False otherwise.</returns>
</member> </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)"> <member name="M:DigitalData.Modules.Logging.LogConfig.#ctor(DigitalData.Modules.Logging.LogConfig.PathType,System.String,System.String)">
<summary> <summary>
Initializes a new LogConfig object with a logpath and optinally a filename-suffix. 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> <param name="ClassName">The name of the class the logger belongs to</param>
<returns>An object of Logging.Logger</returns> <returns>An object of Logging.Logger</returns>
</member> </member>
<member name="M:DigitalData.Modules.Logging.LogConfig.ClearLogs">
<summary>
Clears the internal log
</summary>
</member>
<member name="M:DigitalData.Modules.Logging.LogConfig.GetClassFullName"> <member name="M:DigitalData.Modules.Logging.LogConfig.GetClassFullName">
<summary> <summary>
Gets the fully qualified name of the class invoking the calling method, Gets the fully qualified name of the class invoking the calling method,

View File

@ -18,38 +18,7 @@ Public Class clsEmailIMAP
' Logger.Info(e.Log) ' Logger.Info(e.Log)
'End Sub 'End Sub
'Public Function TestIMAPLogin(Server As String, Port As Integer, Username As String, Password As String, Inbox As String) 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("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
Logger.Debug("Connecting to Server {0}:{1} with user {2}", Server, Port, Username) Logger.Debug("Connecting to Server {0}:{1} with user {2}", Server, Port, Username)
Try Try
@ -61,27 +30,50 @@ Public Class clsEmailIMAP
End If End If
Logger.Debug("Connection successful") 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) Dim oMessageIds As IEnumerable(Of UInteger) = oClient.Search(S22.Imap.SearchCondition.Unseen, Inbox)
Logger.Debug("Found {0} messages", oMessageIds.Count) Logger.Debug("Found {0} messages", oMessageIds.Count)
Logger.Debug("Fetching messages...") Logger.Debug("Fetching messages...")
For Each oMessageId As UInteger In oMessageIds For Each oMessageId As UInteger In oMessageIds
Logger.Debug($"Checking message")
Dim oMessage = oClient.GetMessage(oMessageId, False, Inbox) Dim oMessage = oClient.GetMessage(oMessageId, False, Inbox)
Logger.Debug($"Checking message Subject: {oMessage.Subject}, From: {oMessage.From}")
Dim oTempPath = Path.GetTempFileName() Dim oTempPath = Path.GetTempFileName()
Dim oResult = WriteMessageToFile(oMessage, oTempPath) Dim oResult = WriteMessageToFile(oMessage, oTempPath)
Dim oCount As Integer = 0 Dim oCount As Integer = 0
Dim oMsg As New Message(oTempPath) Dim oMsg As New Message(oTempPath)
oCount &= 1 oCount &= 1
If IsTest = False Then If IsTest = False Then
MAIL_LIST.Add(oMsg) MAIL_LIST.Add(oMsg)
Else 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}") Logger.Debug($"message correctly fetched. Mail has been downloaded to {oTempPath}")
End If 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 Try
If IsTest = False Then If IsTest = False Then
File.Delete(oTempPath) File.Delete(oTempPath)
@ -92,8 +84,8 @@ Public Class clsEmailIMAP
Logger.Warn("Temp file could not be deleted") Logger.Warn("Temp file could not be deleted")
End Try End Try
Next Next
oClient.Expunge()
Logger.Debug("Messages fetched") Logger.Debug("Finished Message-Fetch")
End Using End Using
Return True Return True
Catch ex As Exception Catch ex As Exception
@ -101,6 +93,78 @@ Public Class clsEmailIMAP
Return False Return False
End Try End Try
End Function 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> ''' <summary>
''' Uses a private API from MailWriter to write a MailMessage to disk. ''' Uses a private API from MailWriter to write a MailMessage to disk.
@ -126,40 +190,6 @@ Public Class clsEmailIMAP
End Try End Try
End Function 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) '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 ' Try
' Logger.Info(String.Format("Working on TEST_IMAP_COLLECT.....")) ' Logger.Info(String.Format("Working on TEST_IMAP_COLLECT....."))

View File

@ -108,21 +108,18 @@ Public Class clsEmail
Return True Return True
ElseIf CURRENT_POLL_TYPE = "IMAP" Then ElseIf CURRENT_POLL_TYPE = "IMAP" Then
Try 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 'End Using
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()
Return True Return True
Catch ex As Exception Catch ex As Exception
Logger.Warn("Error in IMAP Delete: " & ex.Message) Logger.Warn("Error in IMAP Delete: " & ex.Message)

View File

@ -20,8 +20,8 @@ Public Class clsWorkEmail
Try Try
Logger = LogConf.GetLogger Logger = LogConf.GetLogger
MyLogger = LogConf MyLogger = LogConf
If LogConf.Debug = False Then If LogConf.Debug = True Then
Logger.Info("Detail-Log is on") Logger.Info("DEBUG Active")
End If End If
_email = New clsEmail(LogConf) _email = New clsEmail(LogConf)
_DB_MSSQL = New clsDatabase(LogConf, ConStr) _DB_MSSQL = New clsDatabase(LogConf, ConStr)
@ -36,19 +36,24 @@ Public Class clsWorkEmail
End Try End Try
End Sub End Sub
Public Function WORK_MAIL(msg As Message) Public Function WORK_MAIL(MyEmailMessage As Message)
Try Try
Logger.Debug($"Starting WORK_MAIL...")
CURRENT_MAIL_BODY_ALL = "" CURRENT_MAIL_BODY_ALL = ""
CURRENT_MAIL_BODY_ANSWER1 = "" CURRENT_MAIL_BODY_ANSWER1 = ""
CURRENT_MAIL_BODY_Substr2 = "" CURRENT_MAIL_BODY_Substr2 = ""
CURRENT_MAIL_MESSAGE = msg CURRENT_MAIL_MESSAGE = MyEmailMessage
CURRENT_MAIL_SUBJECT = msg.Subject.ToUpper CURRENT_MAIL_SUBJECT = MyEmailMessage.Subject.ToUpper
Logger.Debug($"Working on email from: {MyEmailMessage.From.EmailAddress}...")
If IsNothing(CURRENT_MAIL_SUBJECT) Then If IsNothing(CURRENT_MAIL_SUBJECT) Then
CURRENT_MAIL_SUBJECT = "" CURRENT_MAIL_SUBJECT = ""
Else
Logger.Debug($"Subject: {CURRENT_MAIL_SUBJECT}...")
End If 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() Dim oTempMailExists As Boolean = SAVE2TEMP()
'Checking wether Mail can be opened 'Checking wether Mail can be opened
Dim oTempMailAccessible As Boolean = False Dim oTempMailAccessible As Boolean = False
@ -63,10 +68,10 @@ Public Class clsWorkEmail
MessageError = False MessageError = False
If CURRENT_MAIL_SUBJECT.Contains("[PROCESSMANAGER]") Then If CURRENT_MAIL_SUBJECT.Contains("[PROCESSMANAGER]") Then
PROCESS_MANAGER_IN() PROCESS_MANAGER_IN()
ElseIf msg.Subject.Contains("[ADDI]") Then ElseIf MyEmailMessage.Subject.Contains("[ADDI]") Then
Else 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() COMMON_EMAIL_IN()
End If End If
INSERT_HISTORY() INSERT_HISTORY()

View File

@ -100,6 +100,7 @@ Public Class clsWorker
MAIL_USER = row("EMAIL_USER") MAIL_USER = row("EMAIL_USER")
MAIL_USER_PW = row("EMAIL_PW") MAIL_USER_PW = row("EMAIL_PW")
MAIL_PORT = row("PORT_IN") MAIL_PORT = row("PORT_IN")
MAIL_INBOX_NAME = "Inbox"
Logger.Debug(String.Format("{0}-{1}", MAIL_FROM, MAIL_SERVER)) Logger.Debug(String.Format("{0}-{1}", MAIL_FROM, MAIL_SERVER))
Dim PWPlain = _wrapper.DecryptData(MAIL_USER_PW) Dim PWPlain = _wrapper.DecryptData(MAIL_USER_PW)
@ -129,7 +130,7 @@ Public Class clsWorker
Case "IMAP" Case "IMAP"
'pollresult = _emailIMAP.IMAP_COLLECT() 'pollresult = _emailIMAP.IMAP_COLLECT()
' 09.04.19: Use S22.Imap instead of IndependentSoft ImapClient ' 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 Select
End If End If

View File

@ -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.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.dll
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin\Debug\DigitalData.EMLProfiler.pdb 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\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\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\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.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.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.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.pdb
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.vbprojAssemblyReference.cache

View File

@ -37,6 +37,7 @@ Public Class MyService
Logger.Warn("ATTENTION: No Connection was established '" & My.Settings.MyConnectionString & "'!") Logger.Warn("ATTENTION: No Connection was established '" & My.Settings.MyConnectionString & "'!")
Else Else
If LOG_ERRORS_ONLY = False Then If LOG_ERRORS_ONLY = False Then
Logger.Info("DEBUG ACTIVATED")
MyLogger.Debug = True MyLogger.Debug = True
Else Else
MyLogger.Debug = False MyLogger.Debug = False

View File

@ -126,74 +126,100 @@ DigitalData.Modules.Database
<param name="Connection">The Firebird connection to use</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> <returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns>
</member> </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> <summary>
Executes a sql query resulting in a table of values. Executes a sql query resulting in a table of values.
</summary> </summary>
<param name="SqlQuery">The query to execute</param> <param name="SqlQuery">The query to execute</param>
<returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns> <returns>A datatable containing the results if the command was executed successfully. Nothing otherwise.</returns>
</member> </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> <summary>
Returns a datatable for a sql-statement Returns a datatable for a sql-statement
</summary> </summary>
<param name="sqlcommand">sqlcommand for datatable (select XYZ from TableORView)</param> <param name="sqlcommand">sqlcommand for datatable (select XYZ from TableORView)</param>
<param name="commandtimeout">Optional Timeout</param>
<returns>Returns a datatable</returns> <returns>Returns a datatable</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.Oracle.NewExecutenonQuery(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.Oracle.NewExecutenonQuery(System.String)">
<summary> <summary>
Executes the passed sql-statement Executes the passed sql-statement
</summary> </summary>
<param name="executeStatement">the sql statement</param> <param name="executeStatement">the sql statement</param>
<param name="commandtimeout">Optional Timeout</param>
<returns>Returns true if properly executed, else false</returns> <returns>Returns true if properly executed, else false</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.Oracle.NewExecuteNonQueryAsync(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.Oracle.NewExecuteScalar(System.String)">
<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)">
<summary> <summary>
Executes the passed sql-statement as Scalar Executes the passed sql-statement as Scalar
</summary> </summary>
<param name="executeStatement">the sql statement</param> <param name="executeStatement">the sql statement</param>
<param name="commandtimeout">Optional Timeout</param> <returns>Returns the scalarvalue</returns>
<returns>Returns true if properly executed, else false</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.MSSQLServer.GetDatatable(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.MSSQLServer.GetDatatable(System.String,System.Int32)">
<summary> <summary>
Returns a datatable for a sql-statement Returns a datatable for a sql-statement
</summary> </summary>
<param name="sqlcommand">sqlcommand for datatable (select XYZ from TableORView)</param> <param name="SqlCommand">sqlcommand for datatable (select XYZ from TableORView)</param>
<param name="Timeout">Optional Timeout</param>
<returns>Returns a datatable</returns> <returns>Returns a datatable</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecutenonQuery(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecutenonQuery(System.String)">
<summary> <summary>
Executes the passed sql-statement Executes the passed sql-statement
</summary> </summary>
<param name="executeStatement">the sql statement</param> <param name="executeStatement">the sql statement</param>
<param name="Timeout">Optional Timeout</param>
<returns>Returns true if properly executed, else false</returns> <returns>Returns true if properly executed, else false</returns>
<remarks></remarks> <remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteScalar(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteScalar(System.String)">
<summary> <summary>
Executes the passed sql-statement as Scalar Executes the passed sql-statement as Scalar
</summary> </summary>
<param name="ScalarSQL">the sql statement</param> <param name="ScalarSQL">the sql statement</param>
<param name="Timeout">Optional Timeout</param>
<returns>Returns true if properly executed, else false</returns> <returns>Returns true if properly executed, else false</returns>
<remarks></remarks>
</member> </member>
<member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteNonQueryAsync(System.String,System.Int32)"> <member name="M:DigitalData.Modules.Database.MSSQLServer.NewExecuteNonQueryAsync(System.String,System.Int32)">
<summary> <summary>

View File

@ -24,7 +24,7 @@ DigitalData.Modules.Logging
</member> </member>
<member name="T:DigitalData.Modules.Logging.LogConfig"> <member name="T:DigitalData.Modules.Logging.LogConfig">
<module>LogConfig</module> <module>LogConfig</module>
<version>0.0.0.7</version> <version>0.0.1.0</version>
<date>02.10.2018</date> <date>02.10.2018</date>
<summary> <summary>
Module that writes file-logs to different locations: Module that writes file-logs to different locations:
@ -125,6 +125,13 @@ DigitalData.Modules.Logging
</summary> </summary>
<returns>True, if debug log will be written. False otherwise.</returns> <returns>True, if debug log will be written. False otherwise.</returns>
</member> </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)"> <member name="M:DigitalData.Modules.Logging.LogConfig.#ctor(DigitalData.Modules.Logging.LogConfig.PathType,System.String,System.String)">
<summary> <summary>
Initializes a new LogConfig object with a logpath and optinally a filename-suffix. 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> <param name="ClassName">The name of the class the logger belongs to</param>
<returns>An object of Logging.Logger</returns> <returns>An object of Logging.Logger</returns>
</member> </member>
<member name="M:DigitalData.Modules.Logging.LogConfig.ClearLogs">
<summary>
Clears the internal log
</summary>
</member>
<member name="M:DigitalData.Modules.Logging.LogConfig.GetClassFullName"> <member name="M:DigitalData.Modules.Logging.LogConfig.GetClassFullName">
<summary> <summary>
Gets the fully qualified name of the class invoking the calling method, Gets the fully qualified name of the class invoking the calling method,