Skip to content

Client libraries

Official client libraries

Duva publishes and maintains a library for Node.js, one for Python, one for Ruby, one for Go and one for PHP: sending, events, suppressions, webhooks and statistics, with the same retries and error handling as the API.

Languages covered

Open source (MIT license); each library is tested against the same conformance suite as the server.

WordPress plugin

Duva Mail sends all the emails of your WordPress site (WooCommerce orders, contact forms, password resets) through the Duva API: it replaces the transport of wp_mail() and changes nothing else on your site.

  • Works with anything that sends through wp_mail(): To, Cc, Bcc, names, attachments and common headers.
  • No silent fallback: if Duva cannot take an email, the failure is returned to WordPress and shown in the plugin settings.
  • Safe retries thanks to an idempotency key: a network timeout never creates a duplicate.
  • The API key can stay out of the database, in wp-config.php (DUVA_MAIL_API_KEY). No telemetry.

You need a Duva account with a verified domain and an API key created for that domain. Installation: Plugins, Add New, search for "Duva Mail", activate, then Settings, Duva Mail. Requires WordPress 5.9 or later and PHP 7.4 or later.

The plugin interface is in English for now; the French translation is awaiting approval.

Integrations

To send through Duva without writing an API call: these packages plug Duva into your framework's mail system.

Another language

No official library is required to use Duva: the API is a plain JSON `POST`. The OpenAPI specification lets you generate a full client in the language of your choice, and the API reference gives working examples in Node.js, Python, PHP, Go and Ruby.

OpenAPI specification · See the full API reference