Send Email using PowerShell

Scenario:

Send Email using PowerShell.

I use a lot of scripts on a schedule basis either to perform changes in Active Directory, Microsoft Exchange OnPremise and Exchange Online. I had to get report on what changes have been done by the script, if there are any, and also to be informed in case of an error (there will be a separate post on error reporting emails). The below uses the Exchange Online to send the email to the intended recipients by login in to the server with a specific account. The email that is sent is in HTML format with High Importance. I personally divide the HTML and then I combine it again to send it and the only reason I am doing this is because I use it on my scripts and multiple values are generated. I fill with these values the cells of he table that I create. You will find the exact use of this on my other posts/scripts.

Related Links:

Solution / Script: