elasticemail/elasticemail-php
ElasticEmail PHP SDK for managing email via the REST API: send campaigns, transactional email, contacts, and templates using a generated Guzzle-based client with API key auth. Requires PHP 7.4+.
/emails/transactional, /emails, /emails/mergefile) let us safely retry a send after a timeout or dropped connection without a customer receiving — or being billed for — the same email twice. This turns "retry" from a support-ticket generator into a supported product behavior.TransactionID/MessageID and is not charged again, per-send cost forecasting no longer needs a "retry buffer" margin. Replaces the manual de-duplication tables many teams keep today.mergefile imports so a re-run after a partial failure doesn’t double-send to a segment.Adopt if:
Look elsewhere if:
$contentType positionally to the three send methods — the new $idempotency_key argument sits in front of it and that call will now break. Budget a dependency audit before pinning the version. (Calls with just the payload are unaffected.)"This package lets us replace our patchwork of SMTP providers and manual email tools with a single, scalable API for all customer communications—transactional, marketing, and notifications. It cuts costs by ~30% vs. our current setup, adds analytics to measure campaign performance, and reduces support tickets from misconfigured emails. The new release adds an industry-standard safety net: if a send times out, we can retry it and the customer still gets exactly one email and we're still charged exactly once. That removes a whole class of 'why did I get this twice?' incidents and the manual de-duplication workaround we'd otherwise have to build. For $15/month, we get deliverability guarantees, bulk uploads, and a self-service portal for marketing teams. ROI comes from higher open rates (via segmentation), lower churn (better notifications), and fewer duplicate-send refunds."
*"The ElasticEmail PHP SDK is a drop-in replacement for our current email logic. It handles:
Mail::send() calls with API calls for password resets, invoices, etc.4.4.0 — idempotent sends:
emailsTransactionalPost, emailsPost, emailsMergefilePost) take an optional $idempotency_key as the second parameter, plus matching ...WithHttpInfo, ...Async, ...AsyncWithHttpInfo, and ...Request variants.Idempotency-Replayed: true, same TransactionID/MessageID), nothing sent or charged. Same key + different body/endpoint → 422. Same key while in flight → 409 (back off and retry). Malformed key → 400. Unconfirmed key → 503 with Retry-After. 4xx/5xx releases the key so a corrected retry works. Keys are account-scoped (subaccounts separate) and expire 24h after first use.$idempotency_key now precedes $contentType. Any call passing $contentType positionally must pass null first or switch to named arguments. Payload-only calls are unaffected. Audit before bumping.Tradeoff: 600s timeout per request (but 20 concurrent connections allowed). We'll need to batch large exports. Docs are solid, but we'll need to wrap the SDK in a service layer for consistency — the idempotency-key lifecycle (generate, persist, reuse, expire) is exactly the kind of thing that belongs in that wrapper, not scattered across call sites."*
*"No more begging devs for email changes! This API lets us:
Example: Launch a 'Summer Sale' campaign in 10 minutes—no UI training needed."*
How can I help you explore Laravel packages today?