send email to list of email id's in an csv file

Hi Experts,

I have an excel sheets which contails a field named "Primary Owner" and it contains email id's of users. I would like to send email to those users in single email using powershell. How can i do that.

PrimaryOwner
abc@yammer.com
cdf@yammer.com

Normally i will define the users in To section like below.. but here, the ccsv file content will change in each time 

$to = "abc@yammer.com","cdf@yammer.com"

Send-MailMessage -SmtpServer server1 -To $to -From $from -Subject $subject  -Body $body -BodyAsHtml 

September 3rd, 2015 5:55pm

Open the Excel Workbook. Read the worksheet rows and concatenate the addresses into an array. Use the array as the "To" parameter.

Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 6:20pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics