Hi there,
How do I modify the script such that it can take in three parameter to send 3 attachment instead of one attachment?
How do I modify the script such that it can take in three parameter to send 3 attachment instead of one attachment?
param( [string]$t = "t", [string]$a = "a")
$t = $t -split ","
$pwd = ConvertTo-SecureString ‘mypassword’ -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential someone@someone.com,$pwd
$param = @{
SmtpServer = 'smtp.someone.com'
Port = 25
UseSsl = $false
Credential = $cred #remove this if SMTP authentication is not required
From = 'someone@someone.com'
To = $t
Subject = 'Scan results from Checkmarx'
Body = "Please find scan results attached."
Attachments = $a
}
Send-MailMessage @param