Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Powershell email-notifications

$
0
0

Hello everyone,

This is the code I am using for sending mails from outlook to yahoo.

It works perfectly,

$OL = New-Object -ComObject outlook.application

Start-Sleep 5
$mItem= $OL.CreateItem("olMailItem")

$mItem.To = "monitoring@vocera.com"
$mItem.Subject = "Powermail"
$mItem.Body = "Sent from Powershell"

$mItem.send()

Can anybody please help me on modifying this code so that email is sent after every 5 mins repeatedly.

Thanks.


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>