Änderungen

This commit is contained in:
ja
2021-10-07 13:41:55 +02:00
parent 579478646b
commit 8feec78bb2

View File

@@ -76,20 +76,20 @@ Partial Class login_ForgotPW
If SendEmail(username, password, email) = True Then If SendEmail(username, password, email) = True Then
'password = RandomString(New Random, 10) 'password = RandomString(New Random, 10)
'If (getDateoftoken(tokenname) = True) Then If (getDateoftoken(tokenname) = True) Then
'Dim msgboxstyle = vbDefaultButton1 + vbOK Dim msgboxstyle = vbDefaultButton1 + vbOK
' MsgBox(tokenname, msgboxstyle) MsgBox(tokenname, MsgBoxStyle)
'Else Else
' MsgBox("token nicht mehr Gültig! Neuer wird generiert!") MsgBox("token nicht mehr Gültig! Neuer wird generiert!")
'tokenname = genToken(username, password, email) 'tokenname = genToken(username, password, email)
'End If End If
'SendEmail(username, password, email) 'SendEmail(username, password, email)
MsgBox("Mail would be sent successfully!") MsgBox("Mail would be sent successfully!")
lblMessage.ForeColor = Color.Green lblMessage.ForeColor = Color.Green
lblMessage.Text = "Passwort wurde erfolgreich an die angegebene E-Mail Adresse gesendet." lblMessage.Text = "Passwort wurde erfolgreich an die angegebene E-Mail Adresse gesendet."
ElseIf SendEmail(username, password, email) = False Then ElseIf SendEmail(username, password, email) = False Then
MsgBox("Mail would not be sent successfully!") MsgBox("Mail would not be sent successfully!")
lblMessage.ForeColor = Color.Red lblMessage.ForeColor = Color.Red
lblMessage.Text = "Diese E-Mail ist nicht in unserer Datenbank vorhanden." lblMessage.Text = "Diese E-Mail ist nicht in unserer Datenbank vorhanden."
End If End If
@@ -131,10 +131,11 @@ Partial Class login_ForgotPW
' Msg.Attachments.Add(attachment) ' Msg.Attachments.Add(attachment)
mySmtpsvr.Send(Msg) mySmtpsvr.Send(Msg)
MsgBox("SENT") MsgBox("SENT")
Return True
Else Else
Return False Return False
End If End If
Return True
Catch ex As Exception Catch ex As Exception
MsgBox(Err.Number & ex.Message & ex.StackTrace.ToString) 'Falls ein Fehler auftritt wird eine MsgBox angezeigt MsgBox(Err.Number & ex.Message & ex.StackTrace.ToString) 'Falls ein Fehler auftritt wird eine MsgBox angezeigt
End Try End Try