E-mail Anywhere In Your PowerShell Scripts
· ☕ 4 min read
In my previous scripts I’ve included a function to send log files to an on-premises Exchange server. I’ve now put together an example script to improve this function to send emails to external e-mail providers, for example: Office 365, Outlook.com or GMail.com.
This new code is designed to support many different requirements:
No logging at all. Logging but with no e-mail. Logging with e-mail. E-mail with username & password authentication, with SSL.