Last active
May 31, 2016 17:10
-
-
Save gregjhogan/b57ac31bc7c933d3d2145cf2ae056dc3 to your computer and use it in GitHub Desktop.
Azure Office 365 SMTP send
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $Cred = Get-Credential | |
| $From = $Cred.UserName | |
| $To = $Cred.UserName | |
| $Body = "Hello World!" | |
| $Subject = "O356 SMTP Test" | |
| Send-MailMessage -To $To -Subject $Subject -Body $Body -BodyAsHtml -UseSsl -Port 587 -SmtpServer 'smtp.office365.com' -From $From -Credential $Cred |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment