Python requests: trying to make Mailgun “Sending Inline Images” sample work
问题 I'm stuck with example from http://documentation.mailgun.com/user_manual.html?highlight=inline%20image#sending-via-api UPD: Problem below occurs on virtual machine, while it works on another. import requests requests.post( "https://api.mailgun.net/v2/samples.mailgun.org/messages", auth=("api", "key-3ax6xnjp29jd6fds4gc373sgvjxteol0"), files=[("inline", open("files/test.jpg"))], data={"from": "Excited User <me@samples.mailgun.org>", "to": "bar@example.com", "subject": "Hello", "text": "Testing