As an Exchange administrator, you will probably need an automated solution for sending emails from your PowerShell scripts. Whether it's for sending notifications to users in a specific database or emailing the output of your scripts to a reporting mailbox, the transmission of messages like these will prove very useful in performing common day-to-day administrative scripting tasks. In this recipe, we'll take a look at how you can send SMTP email messages from PowerShell to the recipients in your Exchange organization.
Sending SMTP emails through PowerShell
How to do it...
PowerShell v2 and later includes a core cmdlet that can be used to send email messages through SMTP to one or more recipients. Use the following...