MS .Net Update

This commit is contained in:
2023-10-11 13:49:10 +02:00
parent 9a33f97c58
commit b9dbd3c4c3
31 changed files with 792 additions and 724 deletions

View File

@@ -910,19 +910,38 @@ Public Class frmMain
End Sub
Private Sub btnsendtestmail_Click(sender As Object, e As EventArgs) Handles btnsendtestmail.Click
Dim _ss2email As New Email(MyLogger)
' Dim _ss2email As New Email(MyLogger)
Dim llmail As New MailSender(MyLogger)
If txtTestmailTo.Text <> String.Empty Then
My.Settings.Save()
Dim wrapper As New clsEncryption("!35452didalog=")
Dim PWPlain = wrapper.DecryptData(EMAIL_PWTextBox.Text)
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)
If llmail.ConnectToServer(EMAIL_SMTPTextBox.Text, PORTTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, AUTH_TYPEComboBox.Text) = True Then
Dim oSendto As New List(Of String)
oSendto.Add(txtTestmailTo.Text)
Dim oAttMt As New List(Of String)
If txtAttachment.Text <> String.Empty Then
oAttMt.Add(txtAttachment.Text)
End If
If llmail.SendMail(oSendto, EMAIL_FROMTextBox.Text, "Testmail from GUI WMResultHandler", "TEST", Now, oAttMt, 1) = True Then
MsgBox("Email has been sent successfully.", MsgBoxStyle.Information)
Else
MsgBox("Could not send the testmail. Please check the log.", MsgBoxStyle.Exclamation)
End If
llmail.DisconnectFromServer()
Else
MsgBox("Could not send the testmail. Please check the log.", MsgBoxStyle.Exclamation)
MsgBox("Could not connect to server. Please check the log.", MsgBoxStyle.Exclamation)
End If
' Dim oSMTP As SmtpClient = llmail.New_SMTPConnection(Nothing, EMAIL_SMTPTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, AUTH_TYPEComboBox.Text, PORTTextBox.Text)
'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