Skip to content

Conversation

@attesch
Copy link

@attesch attesch commented Oct 9, 2021

By submitting a PR to this repository, you agree to the terms within the Checkmarx Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

The example config file and readme do not have the smtp alert recipients value correct. multiple emails need to be added as an array of strings for the PowerShell cmdlet Send-MailMessage to properly read all senders.

References

Include supporting link to GitHub Issue/PR number

Testing

Update cx_health_mon_config.json and add email addresses to recipients using a json array ["me@company.com", "you@company.com"]

$config = cat .\cx_health_mon_config.json |convertfrom-json

$mailargs = @{
From = youremail@company.com
Body = "test Message to multiple senders"
Subject = "A test"
To = $config.alertingSystems.smtp.recipients
Priority = "High"
SmtpServer = smtp.company.com
Port = 25
}

Send-MailMessage @mailargs # Message will send to both users

Checklist

  • I have added documentation for new/changed functionality in this PR (if applicable). If documentaiton is a Wiki Update, please indicate desired changes within PR MD Comment
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants