Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
Use the Send-MailMessage cmdlet to easily send email from PowerShell via your SMTP server.
April 17, 2014
Q: Can I send an email from PowerShell?
A: Provided you have an available SMTP server, you can easily send email from PowerShell. Use the following simple command:
Send-MailMessage -To '[email protected]' -Body 'test' -Subject 'test subject' -from '[email protected]' -smtpServer 'savdalex01.savilltech.net'
You May Also Like