Created
July 11, 2021 18:56
-
-
Save kuharan/765590cedaca44c8ae89e3a106c61119 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
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