Compare commits
5 Commits
882824d80f
...
41165a470d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41165a470d | ||
|
|
8128987be4 | ||
|
|
6ebd3b82b6 | ||
|
|
d18ebfe912 | ||
|
|
b614b3f140 |
@@ -83,13 +83,14 @@ Public Class EmailFunctions
|
||||
Dim oFinalBodyText = String.Format(EmailStrings.EMAIL_WRAPPING_TEXT.Replace(EmailStrings.constNAME_ZUGFERD_PORTAL, NamePortal), oCompleteBodyText)
|
||||
|
||||
Dim oEmailAddress = pEmailData.From
|
||||
Dim oAttachment = pEmailData.Attachment
|
||||
If oAttachment <> String.Empty Then
|
||||
_logger.Debug($"Attachment_String [{oAttachment}]!")
|
||||
If IO.File.Exists(oAttachment) = False Then
|
||||
_logger.Info($"Attachment.File [{oAttachment}] is not existing!!!")
|
||||
Dim oAttachmentPath = pEmailData.Attachment
|
||||
If oAttachmentPath <> String.Empty Then
|
||||
_logger.Debug($"Attachment_String [{oAttachmentPath}]!")
|
||||
If IO.File.Exists(oAttachmentPath) = False Then
|
||||
_logger.Info($"Attachment.File [{oAttachmentPath}] is not existing!!!")
|
||||
End If
|
||||
End If
|
||||
Dim oAttachmentPathEscaped = oAttachmentPath.Replace("'", "''")
|
||||
|
||||
If IsNothing(oEmailAddress) OrElse String.IsNullOrWhiteSpace(oEmailAddress) Then
|
||||
_logger.Warn("Could not find email-address for MessageId {0}", MessageId)
|
||||
@@ -133,7 +134,7 @@ Public Class EmailFunctions
|
||||
,'{oFinalBodyText}'
|
||||
,'{SourceProcedure}'
|
||||
,'{oCreatedWho}'
|
||||
,'{oAttachment}')"
|
||||
,'{oAttachmentPathEscaped}')"
|
||||
_mssql.ExecuteNonQuery(oInsert)
|
||||
Else
|
||||
'If oDTResult.Rows.Count = 0 Then
|
||||
|
||||
@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Digital Data")>
|
||||
<Assembly: AssemblyProduct("Modules.Jobs")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2021")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2022")>
|
||||
<Assembly: AssemblyTrademark("1.8.7.0")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
|
||||
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
|
||||
<Assembly: AssemblyVersion("1.8.6.0")>
|
||||
<Assembly: AssemblyFileVersion("1.8.6.0")>
|
||||
<Assembly: AssemblyVersion("1.8.7.0")>
|
||||
<Assembly: AssemblyFileVersion("1.8.7.0")>
|
||||
|
||||
@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("Language")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2022")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: AssemblyTrademark("1.6.1.0")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.6.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.6.0.0")>
|
||||
<Assembly: AssemblyVersion("1.6.1.0")>
|
||||
<Assembly: AssemblyFileVersion("1.6.1.0")>
|
||||
|
||||
@@ -12,4 +12,15 @@ Public Module StringEx
|
||||
If String.IsNullOrEmpty(pString) Then Return pString
|
||||
Return pString.Substring(0, Math.Min(pLength, pString.Length))
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Replaces single quotes in text for SQL Commands.
|
||||
''' </summary>
|
||||
''' <param name="pString">The string</param>
|
||||
''' <returns>The escaped string.</returns>
|
||||
<Extension()>
|
||||
Public Function EscapeForSQL(pString As String) As String
|
||||
If String.IsNullOrEmpty(pString) Then Return pString
|
||||
Return pString.Replace("'", "''")
|
||||
End Function
|
||||
End Module
|
||||
|
||||
@@ -113,17 +113,21 @@ Public Class Limilab
|
||||
End Try
|
||||
End Function
|
||||
Public Function IMAPGetMessageIDs_AllMails() As List(Of Long)
|
||||
Dim oListuids As New List(Of Long)
|
||||
Logger.Debug("Starting IMAPGetMessageIDs ...")
|
||||
If Initialized = False Then
|
||||
Return Nothing
|
||||
End If
|
||||
Try
|
||||
Dim oConnect As Boolean = ImapConnect()
|
||||
Dim oConnectionSuccessful As Boolean = ImapConnect()
|
||||
Dim oListuids As List(Of Long)
|
||||
|
||||
If oConnect = True Then
|
||||
If oConnectionSuccessful = True Then
|
||||
Logger.Debug("Checking for new messages..")
|
||||
oListuids = ImapGetMessageIDs_All()
|
||||
CURR_ListUIDs = oListuids
|
||||
Else
|
||||
Logger.Warn("Connection was NOT successful. Returning Nothing.")
|
||||
Return Nothing
|
||||
End If
|
||||
Return oListuids
|
||||
Catch ex As Exception
|
||||
@@ -223,10 +227,13 @@ Public Class Limilab
|
||||
Private Function ImapGetMessageIDs_All() As List(Of Long)
|
||||
Dim oListuids As New List(Of Long)
|
||||
Try
|
||||
Logger.Debug("Opening Inbox..")
|
||||
CurrentImapObject.SelectInbox()
|
||||
|
||||
Logger.Debug("Searching messages..")
|
||||
oListuids = CurrentImapObject.Search(Flag.All)
|
||||
|
||||
Logger.Debug("[{0}] messages found.", oListuids.Count)
|
||||
Return oListuids
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
|
||||
Reference in New Issue
Block a user