Skip to content

Commit

Permalink
this is easier
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Sewell authored and Rob Sewell committed Feb 7, 2019
1 parent 2be0783 commit 61f4cc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/configurations/configuration.ps1
Expand Up @@ -8,7 +8,7 @@ Register-PSFConfigValidation -Name validation.LogFileComparisonValidations -Scri
$EmailValidationSb = {
param ([string]$input)
$EmailRegEx = "^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"
if ($input -match $EmailRegEx) {
if (($input -match $EmailRegEx) -or -not ($input) ) {
[PsCustomObject]@{Success = $true; value = $input}
} else {
[PsCustomObject]@{Success = $false; message = "does not appear to be an email address - $input"}
Expand Down Expand Up @@ -235,7 +235,7 @@ Set-PSFConfig -Module dbachecks -Name domain.domaincontroller -Value $null -Init

# email
Set-PSFConfig -Module dbachecks -Name mail.failurethreshhold -Value 0 -Initialize -Description "Number of errors that must be present to generate an email report"
Set-PSFConfig -Module dbachecks -Name mail.smtpserver -Value $null -Validation string -Initialize -Description "Store the name of the smtp server to send email reports"
Set-PSFConfig -Module dbachecks -Name mail.smtpserver -Value $null -Initialize -Description "Store the name of the smtp server to send email reports"
Set-PSFConfig -Module dbachecks -Name mail.to -Value $null -Validation validation.EmailValidation -Initialize -Description "Email address to send the report to"
Set-PSFConfig -Module dbachecks -Name mail.from -Value $null -Validation validation.EmailValidation -Initialize -Description "Email address the email reports should come from"
Set-PSFConfig -Module dbachecks -Name mail.subject -Value 'dbachecks results' -Validation String -Initialize -Description "Subject line of the email report"
Expand Down

0 comments on commit 61f4cc6

Please sign in to comment.