Jobs: Change Email Text for Filesize Exceeded
This commit is contained in:
@@ -407,8 +407,10 @@ Public Class ImportZUGFeRDFiles
|
||||
|
||||
Create_HistoryEntry(oMessageId, oMD5CheckSum, "REJECTED - File size limit reached", oFBTransaction)
|
||||
|
||||
Dim oBody = String.Format(EmailStrings.EMAIL_FILE_SIZE_REACHED, oArgs.MaxAttachmentSizeInMegaBytes)
|
||||
Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oMessageId)
|
||||
Dim oKey = FileSizeLimitReachedException.KEY_FILENAME
|
||||
Dim oFileExceedingThreshold = IIf(ex.Data.Contains(oKey), ex.Data.Item(oKey), "")
|
||||
Dim oBody = String.Format(EmailStrings.EMAIL_FILE_SIZE_REACHED, oArgs.MaxAttachmentSizeInMegaBytes, oFileExceedingThreshold, oEmailData.Subject)
|
||||
|
||||
_email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "FileSizeLimitReachedException", _EmailOutAccountId)
|
||||
AddRejectedState(oMessageId, "FileSizeLimitReachedException", "Erlaubte Dateigröße überschritten", "", oSQLTransaction)
|
||||
@@ -767,6 +769,7 @@ Public Class ImportZUGFeRDFiles
|
||||
''' <returns></returns>
|
||||
Private Function Check_FileSize(pFileInfo As FileInfo, pMaxFileSizeInMegaBytes As Integer) As Boolean
|
||||
_logger.Info("Checking Filesize of {0}", pFileInfo.Name)
|
||||
_logger.Debug("Filesize threshold is {0} MB.", pMaxFileSizeInMegaBytes)
|
||||
|
||||
If pMaxFileSizeInMegaBytes <= 0 Then
|
||||
_logger.Debug("Filesize is not configured. Skipping check.")
|
||||
@@ -775,8 +778,6 @@ Public Class ImportZUGFeRDFiles
|
||||
|
||||
Dim oMaxSize = pMaxFileSizeInMegaBytes * 1024 * 1024
|
||||
|
||||
_logger.Debug("Filesize threshold is {0} bytes.", oMaxSize)
|
||||
|
||||
If oMaxSize > 0 And pFileInfo.Length > oMaxSize Then
|
||||
_logger.Debug("Filesize is bigger than threshold. Rejecting.")
|
||||
Return False
|
||||
|
||||
Reference in New Issue
Block a user