Solved

How would I add another email recipient to this powershell script?

Posted on 2013-01-27
2
615 Views
Last Modified: 2013-01-29
How would I add another email recipient to this powershell script?

$ol = New-Object -comObject Outlook.Application
$mail = $ol.CreateItem(0)
$Mail.Recipients.Add("me@email.com")
$Mail.Subject = "Report"
$Mail.Body = "
Hi there!
"
$Mail.Send()

Open in new window

0
Comment
Question by:Thaidog
2 Comments
 
LVL 68

Accepted Solution

by:
Qlemo earned 250 total points
ID: 38824900
ol = New-Object -comObject Outlook.Application
$mail = $ol.CreateItem(0)
$Mail.Recipients.Add("me@email.com")
$Mail.Recipients.Add("mini-me@email.com")
$Mail.Subject = "Report"
$Mail.Body = "
Hi there!
"
$Mail.Send()

Open in new window

0
 
LVL 40

Assisted Solution

by:Subsun
Subsun earned 250 total points
ID: 38825666
I case, If you want to add multiple recipient in single line..
replace
$Mail.Recipients.Add("me@email.com")

with

$Mail.to = "me@email.com;me2@email.com;me2@email.com;me3@email.com"
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Hi all.   The other day I had to change the passwords for a bunch of users on the fly. Because they were so many, I decided to do it in an automated way and I would like to share it with you all.   If you are not doing it directly in a Domain Co…
Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now