-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStage Email.ps1
34 lines (29 loc) · 1.22 KB
/
Stage Email.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$FromAddress = "firstname middlename lastname<[email protected]>"
$Subject="My-Project in test will be pointed to STAGING <EOM>"
$MessageBody = @"
Hi All,
To support the testing, we are planning to point the My-Project STAGING environment to Oracle TCLM database and turn it off the in QA environment.
This will propagate the data changes in MCS Test to STAGING queues instead of the QA queues and may impact the functionalities dependent on My-Project in QA environment.
Please let us know if there are any concerns, I will let you know when the change is completed.
Thanks,
firstname middlename lastname.
ITS Team Leader
ITS Application Delivery - project
yourcompany Insurance Company of America
973 948 1788
"@
#create COM object named Outlook
$Outlook = New-Object -ComObject Outlook.Application
#create Outlook MailItem named Mail using CreateItem() method
$Mail = $Outlook.CreateItem(0)
#add properties as desired
$Mail.To = $FromAddress
$Mail.Subject = $Subject
$Mail.Body = $MessageBody
#send message
$Mail.Send()
#quit and cleanup
#$Outlook.Quit()
#[System.Runtime.Interopservices.Marshal]::ReleaseComObject($Outlook) | Out-Null
Write-Host "Email sent for STAGING !!"