Spaces:
Runtime error
Runtime error
File size: 752 Bytes
ea406bd 9ee00e3 ea406bd 9ee00e3 ea406bd 9ee00e3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import requests
import json
def post_request(url, data, headers=None):
data = json.dumps(data)
headers = {'Content-type': 'application/json', 'Accept': 'application/json'}
response = requests.post(url, data=data, headers=headers)
return response.status_code, response.json()
email_body_params = {
"username": "mayo",
"verify_link": "new hai yeh bro agar ye aya toh maja aya"
}
details = {
"recipients": ["[email protected]", "[email protected]"],
"subject": "Welcome to Techdocs:[Account Verification]",
"template_name": "email_verification.html",
"template_kwargs": email_body_params
}
print(post_request("https://api.techdocs.caffienecrewhacks.tech/api/send", details)) |