MS Push2JJ
This commit is contained in:
@@ -59,6 +59,9 @@
|
||||
<Reference Include="DigitalData.Modules.Messaging">
|
||||
<HintPath>..\Message\bin\Debug\DigitalData.Modules.Messaging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FirebirdSql.Data.FirebirdClient">
|
||||
<HintPath>P:\Projekte DIGITAL DATA\DIGITAL DATA - Entwicklung\DLL_Bibliotheken\FirebirdSql.Data.FirebirdClient.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog">
|
||||
<HintPath>..\Modules.Logging\bin\Debug\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
@@ -10,7 +10,7 @@ Public Class MyComService
|
||||
Private _firebird As Firebird
|
||||
Private _MSSQL As MSSQLServer
|
||||
Private _Email As Email
|
||||
Private _EmailAlt As clsEmail
|
||||
'Private _EmailAlt As clsEmail
|
||||
Public Shared threadEmailQueue As BackgroundWorker
|
||||
Protected Overrides Sub OnStart(ByVal args() As String)
|
||||
' Code zum Starten des Dienstes hier einfügen. Diese Methode sollte Vorgänge
|
||||
@@ -28,7 +28,7 @@ Public Class MyComService
|
||||
_firebird = New Firebird(MyLoConfig, My.Settings.FB_ConnString, My.Settings.FB_DATABASE, My.Settings.FB_USER, My.Settings.FB_PW)
|
||||
End If
|
||||
_Email = New Email(MyLoConfig)
|
||||
_EmailAlt = New clsEmail(MyLoConfig)
|
||||
'_EmailAlt = New clsEmail(MyLoConfig)
|
||||
If My.Settings.SQLSERVER_CS <> String.Empty Then
|
||||
_MSSQL = New MSSQLServer(MyLoConfig, My.Settings.SQLSERVER_CS)
|
||||
End If
|
||||
@@ -82,6 +82,9 @@ Public Class MyComService
|
||||
Else
|
||||
MyLoConfig.Debug = False
|
||||
End If
|
||||
If threadEmailQueue.IsBusy Then
|
||||
Exit Sub
|
||||
End If
|
||||
_Email = New Email(MyLoConfig)
|
||||
If My.Settings.FB_ConnString <> String.Empty Then
|
||||
_firebird = New Firebird(MyLoConfig, My.Settings.FB_ConnString, My.Settings.FB_DATABASE, My.Settings.FB_USER, My.Settings.FB_PW)
|
||||
@@ -190,11 +193,11 @@ Public Class MyComService
|
||||
'End If
|
||||
|
||||
Dim oSendResult As Boolean = False
|
||||
oSendResult = _EmailAlt.Email_Send_Independentsoft(oSubject, oBody, oEmailTo, oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType, oAttachment)
|
||||
If oSendResult = False Then
|
||||
oSendResult = _Email.NewEmail(oEmailTo, oSubject, oBody, oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType, "DDEDMI_ComService", oAttachment.ToString)
|
||||
' oSendResult = _EmailAlt.Email_Send_Independentsoft(oSubject, oBody, oEmailTo, oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType, oAttachment)
|
||||
' If oSendResult = False Then
|
||||
oSendResult = _Email.NewEmail(oEmailTo, oSubject, oBody, oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType, "DDEDMI_ComService", oAttachment.ToString)
|
||||
|
||||
End If
|
||||
' End If
|
||||
If oSendResult = True Then
|
||||
Dim upd = $"UPDATE TBEDM_EMAIL_QUEUE SET EMAIL_SENT = CURRENT_TIMESTAMP,COMMENT = '{oComment}' WHERE GUID = {oGUID}"
|
||||
If upd.Contains(",COMMENT = ''") Then
|
||||
@@ -303,10 +306,10 @@ Public Class MyComService
|
||||
End Try
|
||||
|
||||
Dim oSendResult As Boolean = False
|
||||
oSendResult = _EmailAlt.Email_Send_Independentsoft(oSubject, oBody, oEmailTo, oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType, oAttachment)
|
||||
If oSendResult = False Then
|
||||
oSendResult = _Email.NewEmail(oEmailTo, oSubject, oBody, oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType, "DDEDMI_ComService", oAttachment.ToString)
|
||||
End If
|
||||
'oSendResult = _EmailAlt.Email_Send_Independentsoft(oSubject, oBody, oEmailTo, oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType, oAttachment)
|
||||
'If oSendResult = False Then
|
||||
oSendResult = _Email.NewEmail(oEmailTo, oSubject, oBody, oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType, "DDEDMI_ComService", oAttachment.ToString)
|
||||
' End If
|
||||
If oSendResult = True Then
|
||||
Dim oUpdCommand = "UPDATE TBEMLP_EMAIL_OUT SET EMAIL_SENT = GETDATE() WHERE GUID = " & oGUID
|
||||
_MSSQL.NewExecutenonQuery(oUpdCommand)
|
||||
|
||||
Reference in New Issue
Block a user