This commit is contained in:
2020-02-26 14:53:13 +01:00
parent 1496d02e59
commit 73cb093fdf
23 changed files with 404 additions and 302 deletions

View File

@@ -1,5 +1,6 @@
Imports System.ServiceProcess
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Messaging
Imports DD_WMResulthandler
Imports System.Net.Mail
Imports System.Net
@@ -8,7 +9,6 @@ Public Class frmMain
Private _windream As clsWindream_allgemein
Private _database As clsDatabase
Private _profil As clsProfil
Private _email As clsEmail
Dim MyLogger As LogConfig
Dim Logger As Logger
Dim switchRecord As Boolean = True
@@ -34,7 +34,6 @@ Public Class frmMain
Logger = MyLogger.GetLogger()
Load_Constring()
_database = New clsDatabase(MyLogger)
_email = New clsEmail(MyLogger)
Logger.Info("Konfig started: " & Now.ToString)
Try
' Windream instanziieren
@@ -843,7 +842,7 @@ Public Class frmMain
mymesssage.From = New MailAddress(EMAIL_FROMTextBox.Text)
mymesssage.Subject = "TestSubject from RAW Method"
mymesssage.To.Add(New MailAddress(txtTestmail.Text))
mymesssage.To.Add(New MailAddress(txtTestmailTo.Text))
If txtAttachment.Text <> String.Empty Then
Dim oAttment As String = txtAttachment.Text.Replace("W:\", "\\windream\objects\")
@@ -869,22 +868,21 @@ Public Class frmMain
End Sub
Private Sub btnsendtestmail_Click(sender As Object, e As EventArgs) Handles btnsendtestmail.Click
Dim _ss2email As New Email(MyLogger)
If txtTestmail.Text <> String.Empty Then
If txtTestmailTo.Text <> String.Empty Then
My.Settings.Save()
Dim wrapper As New clsEncryption("!35452didalog=")
Dim PWPlain = wrapper.DecryptData(EMAIL_PWTextBox.Text)
If _email.Email_Send("Testmail from GUI WMResultHandler", "This is the body (text will be replaced within profile)", txtTestmail.Text,
EMAIL_FROMTextBox.Text, EMAIL_SMTPTextBox.Text, PORTTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, AUTH_TYPEComboBox.Text, txtAttachment.Text, True) = True Then
If _ss2email.NewEmail(txtTestmailTo.Text, "Testmail from GUI WMResultHandler", "This is the body (text will be replaced within profile)", EMAIL_FROMTextBox.Text, EMAIL_SMTPTextBox.Text,
PORTTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, AUTH_TYPEComboBox.Text, "GUI WMRH - Test") = True Then
MsgBox("Email(s) has/have been sent successfully.", MsgBoxStyle.Information)
Else
MsgBox("Could not send the testmail. Please check the log.", MsgBoxStyle.Exclamation)
End If
End If
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click