fix session

This commit is contained in:
Jonathan Jenne
2023-10-11 15:05:08 +02:00
parent 52c3939ad6
commit 2a76d515cb
2 changed files with 8 additions and 5 deletions

View File

@@ -57,7 +57,8 @@ Public Class clsJob_Work
If Attachment_Filename <> String.Empty Then
oAttMt.Add(Attachment_Filename)
End If
If _mail.Connect(oMAILSMTP, oMAIL_PORT, oMAIL_USER, oPWPlain, oMAIL_AUTH_TYPE) = True Then
Dim oSession = _mail.Connect(oMAILSMTP, oMAIL_PORT, oMAIL_USER, oPWPlain, oMAIL_AUTH_TYPE)
If oSession.Connected = True Then
Logger.Info($"MAIL: Connection to {oMAILSMTP} successfull!")
If _mail.SendMail(oSendto, oMAILFROM, Email_subject, Email_Body, Now, oAttMt, 0) = True Then
Return True