Last active
January 31, 2020 17:54
-
-
Save Ba4bes/d53c5005e1887e25d66aa1b82a92fbd2 to your computer and use it in GitHub Desktop.
This file contains 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
$URL = "Paste the Logic App URL here" | |
$Body = [PSCustomObject]@{ | |
To = "Ex@mp.le" | |
Subject = "Subject of the mail" | |
Body = "Body (you can use HTML here if you like)" | |
} | |
# Create a line that creates a JSON from this object | |
$JSONBody = $Body | ConvertTo-Json | |
# this line sends the email through the logic app | |
Invoke-RestMethod -Method POST -Uri $URL -Body $JSONBody -ContentType 'application/json' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment