Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple email recepients #25

Open
Bosta000 opened this issue Dec 11, 2018 · 4 comments
Open

multiple email recepients #25

Bosta000 opened this issue Dec 11, 2018 · 4 comments

Comments

@Bosta000
Copy link

Hello all, How can I add multiple recipients in the "Citrix-PVS77-Farm-Health-toHTML_Parameters"? I tried all options with ;, ....

thanks

@mikekacz
Copy link
Contributor

Hi,

that would need to small changes in both files.
Citrix-PVS77-Farm-Health-toHTML_Parameters.xml (line 73):

		<Variable>
			<!-- Address of the recipient -->
			<Name>emailTo</Name>
**			<Value>citrix@mycompany.ch,second@mycompany.ch</Value>
**			<Type>[array]</Type>
			<Scope>Script</Scope>
		</Variable>

and Citrix-PVS77-Farm-Health-toHTML.ps1 (line 901):

    #send email
    $emailMessage = New-Object System.Net.Mail.MailMessage
    $emailMessage.From = $emailFrom
**    foreach ($addr in $emailTo) {$emailMessage.To.Add( $addr )}
    $emailMessage.Subject = $Subject
    $emailMessage.IsBodyHtml = $true
    $emailMessage.Body = (gc $resultsHTM) | Out-String
    $emailMessage.Attachments.Add($resultsHTM)
    $emailMessage.Priority = ($emailPrio)

** - changed lines

@Bosta000
Copy link
Author

Thanks Mike! How should I offer you a beer? :)

@mikekacz
Copy link
Contributor

👍 no need :)

@mikekacz
Copy link
Contributor

@sacha81 - maybe worth adding to master

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

No branches or pull requests

2 participants