Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darrenjrobinson/d837800c11edd08539cf3b81fb3eaad5 to your computer and use it in GitHub Desktop.
Save darrenjrobinson/d837800c11edd08539cf3b81fb3eaad5 to your computer and use it in GitHub Desktop.
SendGrid Message Format from a PowerShell Azure Function. Associated Blogpost https://blog.darrenjrobinson.com/using-the-azure-functions-sendgrid-output-binding-with-powershell/
$mail = @{
"personalizations" = @(
@{
"to" = @(
@{
"email" = "$($env:sendGridToAddress)"
}
)
}
)
"from" = @{
"email" = "$($env:sendGridFromAddress)"
}
"subject" = "$($emailSubject)"
"content" = @(
@{
"type" = "text/plain"
"value" = "$($emailBody)"
}
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment