我有这个 powershell 脚本来发送带有附件的电子邮件,但是当我添加多个收件人时,只有第一个收件人会收到邮件。我已经阅读了文档,但仍然无法弄清楚。谢谢
$recipients = "Marcel <marcel@turie.eu>, Marcelt <marcel@nbs.sk>"
Get-ChildItem "C:\Decrypted\" | Where {-NOT $_.PSIsContainer} | foreach {$_.fullname} |
send-mailmessage -from "primasfrb@nbs.sk" `
-to "$recipients" `
-subject "New files" `
-body "$teloadmin" `
-BodyAsHtml `
-priority High `
-dno onSuccess, onFailure `
-smtpServer 192.168.170.61