MS Messaging Logging
This commit is contained in:
@@ -135,13 +135,18 @@ Namespace Mail
|
||||
Private Function AddAttachments(pMailBuilder As Limilabs.Mail.MailBuilder, pAttachments As List(Of String)) As Limilabs.Mail.MailBuilder
|
||||
For Each oAttachment In pAttachments
|
||||
Try
|
||||
' Read attachment from disk, add it to Attachments collection
|
||||
If IO.File.Exists(oAttachment) Then
|
||||
Logger.Debug("Adding attachment [{0}] to mail.", oAttachment)
|
||||
pMailBuilder.AddAttachment(oAttachment)
|
||||
If oAttachment <> String.Empty Then
|
||||
' Read attachment from disk, add it to Attachments collection
|
||||
If IO.File.Exists(oAttachment) Then
|
||||
Logger.Debug("Adding attachment [{0}] to mail.", oAttachment)
|
||||
pMailBuilder.AddAttachment(oAttachment)
|
||||
Else
|
||||
Logger.Warn("Attachment [{0}] does not exist. Skipping.", oAttachment)
|
||||
End If
|
||||
Else
|
||||
Logger.Warn("Attachment [{0}] does not exist. Skipping.", oAttachment)
|
||||
Logger.Debug("Attachment is String.Empty")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Could not read or add attachment [{0}]!", oAttachment)
|
||||
Logger.Error(ex)
|
||||
|
||||
Reference in New Issue
Block a user