Skip to content

Commit

Permalink
fixes #54
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Aug 19, 2019
1 parent bbd2a1c commit 13e372a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Private/Main/Send-Notification.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function Send-Notificaton {
Write-Color @script:WriteParameters -Text "[i] Discord output: ", $Data -Color White, Yellow
}
if ($Options.Notifications.MSSQL.Enabled) {
$SqlQuery = Send-SqlInsert -Object $Events -SqlSettings $Options.Notifications.MSSQL -Verbose:$Options.Debug.Verbose
$SqlQuery = Send-SqlInsert -Object $Event -SqlSettings $Options.Notifications.MSSQL -Verbose:$Options.Debug.Verbose
foreach ($Query in $SqlQuery) {
Write-Color @script:WriteParameters -Text '[i] ', 'MS SQL Output: ', $Query -Color White, White, Yellow
}
Expand All @@ -102,17 +102,11 @@ function Send-Notificaton {
$HtmlBody = Set-EmailReportBranding -FormattingParameters $Options.Notifications.Email.AsHTML.Formatting
#$HtmlBody += Set-EmailReportDetails -FormattingParameters $Options.AsHTML.Formatting -Dates $Dates -Warnings $Warnings

$HtmlBody += Export-ReportToHTML -Report $true -ReportTable $Events -ReportTableText "Quick notification event"

# Do Cleanup of Emails
#$HtmlBody = Set-EmailWordReplacements -Body $HtmlBody -Replace '**TimeToGenerateDays**' -ReplaceWith $time.Elapsed.Days
#$HtmlBody = Set-EmailWordReplacements -Body $HtmlBody -Replace '**TimeToGenerateHours**' -ReplaceWith $time.Elapsed.Hours
#$HtmlBody = Set-EmailWordReplacements -Body $HtmlBody -Replace '**TimeToGenerateMinutes**' -ReplaceWith $time.Elapsed.Minutes
#$HtmlBody = Set-EmailWordReplacements -Body $HtmlBody -Replace '**TimeToGenerateSeconds**' -ReplaceWith $time.Elapsed.Seconds
#$HtmlBody = Set-EmailWordReplacements -Body $HtmlBody -Replace '**TimeToGenerateMilliseconds**' -ReplaceWith $time.Elapsed.Milliseconds
$HtmlBody += Export-ReportToHTML -Report $true -ReportTable $Event -ReportTableText "Quick notification event"
$HtmlBody = Set-EmailFormatting -Template $HtmlBody -FormattingParameters $Options.Notifications.Email.AsHTML.Formatting -ConfigurationParameters $Options -Logger $Logger -SkipNewLines

$HTML = $HtmlHead + $HtmlBody
$EmailBody = $HTML
#$ReportHTMLPath = Set-ReportFileName -ReportOptions $Options -ReportExtension 'html'
$ReportHTMLPath = Set-ReportFile -Path $Env:TEMP -FileNamePattern 'PSWinReporting.html' -DateFormat $null
try {
Expand Down

0 comments on commit 13e372a

Please sign in to comment.