| 开发者 | vojtechj |
|---|---|
| 更新时间 | 2026年9月11日 18:22 |
| WordPress版本: | 7.0 |
| 版权: | GPL-2.0-or-later |
wp_mail() function and routes all outgoing emails through the Lettr API. This means every email your site sends — including emails from WooCommerce, contact form plugins, and any other plugin — is delivered through Lettr automatically.
Links
/wp-content/plugins/lettr or install via the WordPress plugin installer.Yes. Sign up for free at lettr.com to get your API key.
Yes. Lettr handles all emails sent via the standard WordPress wp_mail() function, which includes WooCommerce order confirmations, shipping notifications, and customer emails.
No. Lettr uses a REST API instead of SMTP, which means there are no ports to open or SMTP credentials to manage.
Log in to your account at lettr.com and navigate to the API Keys section.
list_folders() — the folders templates are filed into, with each folder's purpose and template count. Nothing else in the API returns a folder id, so without it a caller either omits folder_id and accepts whichever folder the API picks, or hardcodes an integer read out of an app URL.create_template() accepts purpose (transactional or campaign), and list_templates() accepts purpose and folder_id filters. A campaign can only send a template whose purpose is campaign, and the purpose cannot be changed after creation.lettr_idempotency_key filter. Return a stable string and a retried wp_mail() replays the original send instead of delivering a second email. Opt-in by design: deriving a key from the payload would silently collapse two legitimately identical notifications into one. Lettr_Api::send_email() also takes the key as a second argument.preparation_status (pending, ready, failed) — documented; no client change was needed, since responses pass through decoded.bulk_subscribe_audience_contacts_to_topics, bulk_unsubscribe_audience_contacts_from_topics).bulk_create_audience_contacts() now documents the per-contact contacts request shape, the batch-wide list_ids / topics / update_existing options, and the updated / error_count / errors / contacts response fields. No call signature changed — existing payloads send exactly as before.create_audience_contact() fails with a WP_Error code of lettr_api_resource_already_exists (status 409). It previously returned HTTP 500, i.e. lettr_api_send_error (status 500). Custom code branching on the old code no longer matches, and a 409 here must not be retried.