This commit is contained in:
Digital Data - Marlon Schreiber
2019-03-14 22:28:37 +01:00
parent fcd44e78ff
commit fb142d4cef
2 changed files with 23 additions and 25 deletions

View File

@@ -134,10 +134,14 @@ Public Class MyComService
oAttachment = String.Empty
Else
oAttachment = oEmail_Row.Item("EMAIL_ATTMT1")
If File.Exists(oAttachment) = False Then
_Logger.Warn($"Email Attachment FileNotFound Exception!")
Exit Sub
Else
_Logger.Info("Email Attachment is: {0}", oAttachment.ToString)
End If
End If
_Logger.Debug("Email Attachment is: {0}", oAttachment.ToString)
Dim link As String = "pmo://" & oJOB_ID & "-" & oEmail_Row.Item("REFERENCE1")
If oBody.Contains("[%PMOLINK_GER]") Then
oBody = oBody.Replace("[%PMOLINK_GER]", "<a href=""" & link & """>hier</a>")
@@ -147,9 +151,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, "DDEDMI_ComService", oAttachment) = True Then
If _Email.NewEmail(oEmailTo, oSubject, oBody, oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType, "DDEDMI_ComService", oAttachment.ToString) = True Then
Dim upd = "UPDATE TBEDM_EMAIL_QUEUE SET EMAIL_SENT = CURRENT_TIMESTAMP WHERE GUID = " & oGUID
_firebird.ExecuteNonQuery(upd)
End If