Changes Wisag Pitch

This commit is contained in:
Digital Data - Marlon Schreiber
2018-12-18 23:47:18 +01:00
parent eedabf3da6
commit c9577c30ad
5 changed files with 25 additions and 20 deletions

View File

@@ -64,13 +64,13 @@ Public Class MyComService
_Logger.Warn("Firebird-DB could not be intitialized!")
Exit Sub
End If
Dim oSQL = "SELECT * FROM TBEDM_EMAIL_ACCOUNT WHERE GUID IN (SELECT DISTINCT EMAIL_ACCOUNT_ID FROM TBEDM_EMAIL_QUEUE WHERE EMAIL_SENT IS NULL and EMAIL_TO is not null)"
Dim oSQL = "SELECT * FROM TBEDM_EMAIL_ACCOUNT WHERE ACTIVE = True"
Dim oDT_EMAIL_ACCOUNT As DataTable = _firebird.GetDatatable(oSQL)
If IsNothing(oDT_EMAIL_ACCOUNT) Then
_Logger.Warn("DT_EMAIL_ACCOUNT is nothing!")
Exit Sub
End If
oSQL = "SELECT * FROM TBEDM_EMAIL_QUEUE WHERE EMAIL_SENT IS NULL and EMAIL_TO is not null"
oSQL = "SELECT * FROM TBEDM_EMAIL_QUEUE WHERE EMAIL_SENT IS NULL and EMAIL_TO <> ''"
Dim oDT_EMAIL_QUEUE As DataTable = _firebird.GetDatatable(oSQL)
If Not IsNothing(oDT_EMAIL_QUEUE) And oDT_EMAIL_ACCOUNT.Rows.Count >= 1 Then
Dim oEmailTo, oSubject, oBody As String
@@ -119,7 +119,7 @@ Public Class MyComService
oBody = oBody.Replace("[%PMOLINK_US]", "<a href=""" & link & """>here</a>")
End If
If _Email.NewEmail(oEmailTo, oSubject, oBody, oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType) = True Then
If _Email.NewEmail(oEmailTo, oSubject, oBody, oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType, "DDEDMI_ComService") = True Then
Dim upd = "UPDATE TBEDM_EMAIL_QUEUE SET EMAIL_SENT = CURRENT_TIMESTAMP WHERE GUID = " & oGUID
_firebird.ExecuteNonQuery(upd)
End If
@@ -132,9 +132,6 @@ Public Class MyComService
End If
End If
Catch ex As Exception
_Logger.Error(ex)
End Try