Skip to main content

Official Python SDK for the Emercury SMTP API

Project description

Emercury SMTP SDK for Python

The official Python client for sending transactional email and reading outbound delivery statistics through the stable Emercury SMTP API.

Installation

pip install emercury-smtp-sdk

Send an email

import os
import uuid

from emercury_smtp_sdk import (
    ApiClient,
    Configuration,
    EmailAddress,
    EmailApi,
    EmailContentPart,
    EmailContentType,
    SendEmailRequest,
)

configuration = Configuration()
configuration.api_key["ApiTokenAuth"] = os.environ["EMERCURY_API_TOKEN"]

email = SendEmailRequest(
    var_from=EmailAddress(email="sender@example.com", name="Example"),
    to=EmailAddress(email="recipient@example.net"),
    subject="Hello from Emercury",
    contents=[EmailContentPart(
        content_type=EmailContentType.TEXT_SLASH_PLAIN,
        content="Your transactional email is ready.",
    )],
)

with ApiClient(configuration) as api_client:
    result = EmailApi(api_client).send_email(
        email,
        idempotency_key=str(uuid.uuid4()),
    )

Use a unique idempotency key when a send may be retried. The same key and normalized payload return the original response for 24 hours; reusing a key with a different payload returns 409 Conflict.

API reference

All requests default to https://api.smtp.emercury.net. Set Configuration.host when a different endpoint is required.

This package is generated from the official Emercury SMTP OpenAPI contract. Generated client code and reference documentation should not be edited manually.

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

emercury_smtp_sdk-1.0.0.tar.gz (31.9 kB view details)

Uploaded Source

Built Distribution

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

emercury_smtp_sdk-1.0.0-py3-none-any.whl (75.2 kB view details)

Uploaded Python 3

File details

Details for the file emercury_smtp_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: emercury_smtp_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 31.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for emercury_smtp_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6ee60f01dbbd99ec63bd8af158ea3def4a714d54db49b493bd5d757524faf415
MD5 aad80ce33b61543e479ba80dbf133767
BLAKE2b-256 8e477cb4748c4ddfd424f247cfa8c0fae4c0279d9f47c4dc38551c2dbe0b9e96

See more details on using hashes here.

File details

Details for the file emercury_smtp_sdk-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for emercury_smtp_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e86cf6dc7bc43f768b2c0ff9ea4bdfacf7f3eb1048c4d08e377b5b58cda82997
MD5 59ae4a528b4e2f96d9f65260a00f1270
BLAKE2b-256 80becb0e6f76c23c3ca674c9916fa250a26a9c12d812255fc2f38261c8d74d94

See more details on using hashes here.

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