Powershell send-mailmessage – email to multiple recipients

$recipients = "Marcel <marcel@turie.eu>, Marcelt <marcel@nbs.sk>"

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

[string[]]$recipients = "Marcel <marcel@turie.eu>", "Marcelt <marcel@nbs.sk>"

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

$recipients = "Marcel <marcel@turie.eu>", "Marcelt <marcel@nbs.sk>"

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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)