Since the voting buttons (= information about voting) are part of the mail, like text and subject, it is impossible to simply make them visible to some of the recipients. Outlook (or, better, a server, most likely Exchange) will send the same address to all recipients, regardless of whether they are addressed through To , Cc or Bcc .
This is by design, as indicated in RFC2822 (Internet Message Format) :
Destination fields indicate the recipients of the message. each destination field may have one or more addresses, and each address indicates the intended recipients of the message. The only difference between the three fields is how they are used.
You can simply send two mails with the same contents, with the exception of buttons:
param( [string]$username, [string]$username1, ) $Outlook = New-Object -ComObject Outlook.Application $Mail1 = $Outlook.CreateItem(0) $Mail2 = $Outlook.CreateItem(0) $Mail1.To = "$username1" $Mail2.To = "$username" $Mail1.Subject = "SUBJECT" $Mail1.Body = "--content--" $Mail2.Subject = "SUBJECT" $Mail2.Body = "--content--" $mail1.VotingOptions = "Approve;Reject" $Mail1.Send() $Mail2.Send()
To clear recipient addresses, you can add text to letters indicating that this message is also sent to $username .
source share