Skip to main content

Official MailKite SDK for Python — send and manage email over your own authenticated domain.

Project description

MailKite for Python

Official MailKite SDK. One low-level request() plus one method per endpoint. Zero dependencies — standard library only. Python 3.7+.

Install

pip install mailkite

Usage

import os
from mailkite import MailKite

mk = MailKite(os.environ["MAILKITE_API_KEY"])

res = mk.send({
    "from": "hello@myapp.ai",
    "to": "ada@example.com",
    "subject": "Your invoice #1042",
    "html": "<p>Thanks! Receipt attached.</p>",
})

Point at a different base URL with MailKite(key, "https://api.mailkite.dev").

Methods

send(message), listDomains(), createDomain({"domain": ...}), getDomain(id), deleteDomain(id), verifyDomain(id), setWebhook(id, {"url": ...}), deleteWebhook(id), testWebhook(id), checkDomainAvailability(domain), registerDomain({"domain": ..., "contact": {...}}), listRoutes(), createRoute({...}), listMessages(), getMessage(id), retryDelivery(id).

Errors

from mailkite import MailKiteError

try:
    mk.send(msg)
except MailKiteError as e:
    print(e.status, e.message)

See the full docs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mailkite-0.2.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mailkite-0.2.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file mailkite-0.2.0.tar.gz.

File metadata

  • Download URL: mailkite-0.2.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mailkite-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e00e2f6208281e738e03b5b1fbb1611a473e19b7064fd74375d3376f86f2fd9c
MD5 530c8288e9b583ff8141e6dbb644f865
BLAKE2b-256 3bbad9767a6b8367de18753edff4c7f8d43ffbbb559aad985084525bdc4bf54e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mailkite-0.2.0.tar.gz:

Publisher: publish-python.yml on fijiwebdesign/mailkite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mailkite-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mailkite-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mailkite-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98d95972177382eb910f2941162b3a6cf279ead0682ac112fa454422d05e21ff
MD5 2a63ef30045fa7d9a31e851d8f94dfa2
BLAKE2b-256 575bff93a42041c712cb9dd40322827d1408f16ee3c2e3794878486d1d0acbde

See more details on using hashes here.

Provenance

The following attestation bundles were made for mailkite-0.2.0-py3-none-any.whl:

Publisher: publish-python.yml on fijiwebdesign/mailkite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page