Powershell send-mailmessage - email to multiple recipients

The Solution to Powershell send-mailmessage - email to multiple recipients is


$recipients = "Marcel <[email protected]>, Marcelt <[email protected]>"

is type of string you need pass to send-mailmessage a string[] type (an array):

[string[]]$recipients = "Marcel <[email protected]>", "Marcelt <[email protected]>"

I think that not casting to string[] do the job for the coercing rules of powershell:

$recipients = "Marcel <[email protected]>", "Marcelt <[email protected]>"

is object[] type but can do the same job.

~ Answered on 2012-04-20 07:22:01


Most Viewed Questions: