Using powershell to send emails

A quick way to test if you can access the smtp server.

$PSEmailServer = "smtpserver"
Send-MailMessage -From "from@somehost.com" -To "to@somehost.com" -Subject "Test subject" -Body "blah blah blah"

Etiketter: