Skip to content

Instantly share code, notes, and snippets.

@kuharan
Created July 11, 2021 18:56
Show Gist options
  • Save kuharan/765590cedaca44c8ae89e3a106c61119 to your computer and use it in GitHub Desktop.
Save kuharan/765590cedaca44c8ae89e3a106c61119 to your computer and use it in GitHub Desktop.
def send_email(html_payload):
url = "https://xxxx.execute-api.us-east-1.amazonaws.com/default/lambda-function-sendEmail"
payload = json.dumps({
"html": html_payload
})
headers = {
'Content-Type': 'application/json'
}
response = json.loads(requests.get(url, headers=headers, data=payload).text)
return response['response']
response = send_email(html_body)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment