Wednesday, June 10, 2009

PS Sent Mail Script

This time we will have PS to sent mail with Subject and Body we will define within the PS parameters. You can imagine what will be the upcoming articles about shortly , plugging this into PS script  and using PS to sent automated e-mails or alerts as you wish.

This little script is just going to sent mail out……..


# From  This is from address Change it as you wish
# To this is To address
# This is Subject line "Testing PS Script mail"
# This is Body of this E-mail "This script will E-mail you from Power Shell"
# smtpserver="HTS2" HTS2 is my Hub Transfer server, replace this to #your own
# Finally make sure Port 25 is not Blocked from where ever you running #this from and relay is working
$smtp=New-Object Net.Mail.SmtpClient($smtpserver)
$smtp.send("","","Testing PS Script mail ","This script will E-mail you from Power Shell")


open your outlook you will see the e-mail. all credits goes to, and PowerGUI (-: for making live easy


Oz Casey Dedeal

MVP (Exchange)
MCSE 2003, M+, S+, MCDST
Security+, Project +, Server +

Http:// (Blog)

Https:// (Blog)

Https:// (Blog)

1 comment:

Tonny Vilhena said...

There is an outstanding solution is available for corrupt Microsoft Exchange recovery and EDB conversion into PST files. You can easily get this Exchange EDB to PST conversion application with an affordable price and with complete assurance for corrupt Exchange database recovery. It works with great excellence to make EDB file readable within seconds and restore EDB to PST for further usage of Exchange database.

Read More-: