Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiki update for Sending-Mail section #603

Open
jpomfret opened this Issue Feb 19, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@jpomfret
Copy link
Collaborator

jpomfret commented Feb 19, 2019

Wiki Update

The example here needs to be removed or changed since Send-DbcMailMessage has been excluded from the module.
https://github.com/sqlcollaborative/dbachecks/tree/9330fe53b50c385e0d8ce8e463279fd778eeb82b#sending-mail

A suggestion on how to send emails still from @SQLDBAWithABeard:
#539 (comment)

$ouputDirectory = (Get-DbcConfigValue -Name app.maildirectory)
$filename = $outputDirectory + '\file.xml'
Invoke-Dbccheck -OutputFile $fileName -OutputFormat NunitXML

$outputpath = $ouputDirectory + "\index.html"
$reportunit = "ModulePAth\bin\ReportUnit.exe"
& $reportunit $ouputDirectory

$htmlbody = Get-Content -Path $outputpath -ErrorAction SilentlyContinue | Out-String

Send-MailMessage -To -From -SMTP -body $htmlbody

mikepetrak added a commit to mikepetrak/dbachecks that referenced this issue Feb 27, 2019

Update readme.md
Updated email example to fix issue sqlcollaborative#603 at sqlcollaborative#603
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.