def send_complex_message():
return requests.post(
"https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages",
auth=("api", "YOUR_API_KEY"),
files=[("attachment", ("test.jpg", open("files/test.jpg","rb").read())),
("attachment", ("test.txt", open("files/test.txt","rb").read()))],
data={"from": "Excited User <YOU@YOUR_DOMAIN_NAME>",
"to": "foo@example.com",
"cc": "baz@example.com",
"bcc": "bar@example.com",
"subject": "Hello",
"text": "Testing some Mailgun awesomness!",
"html": "<html>HTML version of the body</html>"})
this is the code from mailgun documentation. i need to access the value of "text" within "html". is there a way that i could do that.