
Powershell script to email
###########Define Variables########
$date = “get-date”
$fromaddress = “[email protected]”
$toaddress = “[email protected]”
$Subject = “Test $(get-date)”
$body = Get-Content C:\temp\Test.htm
#$attachment = “C:\sendemail\test.txt”
$smtpserver = “SMTP Server name”
####################################
$message = new-object System.Net.Mail.MailMessage
$message.From = $fromaddress
$message.To.Add($toaddress)
#$message.CC.Add($CCaddress)
#$message.Bcc.Add($bccaddress)
$message.IsBodyHtml = $True
$message.Subject = $Subject
#$attach = new-object Net.Mail.Attachment($attachment)
#$message.Attachments.Add($attach)
$message.body = $body
$smtp = new-object Net.Mail.SmtpClient($smtpserver)
$smtp.Send($message)
Lovely website! I am loving it!! Will come back again. I am taking your feeds also.
y9gh5j
rhz041
jarqkw
e7xlkf
682pxn
4kq444
Hi, i feel that i saw you visited my website so i came to “go back the choose”.I am trying to to find things to improve my website!I suppose its good enough to use some of your ideas!!
sdnxuf
Valuable info. Lucky me I found your website by accident, and I am shocked why this accident did not happened earlier! I bookmarked it.
7glqod
This is a very good tips especially to those new to blogosphere, brief and accurate information… Thanks for sharing this one. A must read article.
w94a5u
8eb1n0
You got a very excellent website, Sword lily I found it through yahoo.
ypcjun
Yay google is my queen helped me to find this great site! .