Created
January 13, 2021 14:45
-
-
Save darrelmiller/abe10957af1da43a0cc1a34f1b20071f to your computer and use it in GitHub Desktop.
Send an Email using Microsoft Graph PowerShell
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
Install-Module Microsoft.Graph | |
Connect-MgGraph | |
$Message = @{ | |
"subject" = "Yo" | |
"body" = @{ | |
"content" = "Here is my message" | |
} | |
"toRecipients" = @( | |
@{ | |
"emailAddress" = @{ | |
"address" = "[email protected]" | |
} | |
} | |
) | |
} | |
Send-MgUserMail -userId sender@domain.org -Message $Message | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment