Python
Send with Python.
Pass your API key and send. Note the key is “from”, quoted — it is a reserved word in Python, so it goes in the dictionary rather than as an argument.
There is no first-party package for this language yet. The REST API is the same from any stack.
Get started- Create a free account and an API key in the dashboard.
- Verify the domain you want to send from.
- Paste the call below. It needs
requests, which most projects already have.
1import requests23requests.post(4 "https://api.mittera.eu/api/emails",5 headers={"Authorization": "Bearer mt_xxxxxxxxx"},6 json={7 "from": "hello@acme.com",8 "to": "you@acme.com",9 "subject": "Hello from mittera",10 "html": "<strong>it arrived.</strong>",11 },12)