Download the PHP package sendaramail/sendara without Composer

On this page you can find all versions of the php package sendaramail/sendara. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sendara

Sendara PHP SDK

The official PHP SDK for the Sendara email API. Send transactional email, run broadcasts, page through your message history, and verify webhooks — with zero runtime dependencies (just ext-curl and ext-json).

Requires PHP 8.1+.

Installation

Quickstart

Create a client with your API key, then send an email:

The resource accessors are also exposed as lazy, memoized properties, so $client->emails is equivalent to $client->emails().

Client options

The second constructor argument is an options array. All fields are optional:

The client automatically:

Send options

emails()->send() accepts these keys:

Key Type Description
to string (required) Recipient address.
from string Sender address. Required after you verify your own domain; sandbox onboarding uses Sendara's shared sender.
subject string Email subject.
html string HTML body.
text string Plain-text body.
templateId string Render a stored template instead of inline body.
templateVars array Variables for the template.
messageType string Message type tag.
metadata array Arbitrary metadata stored with the message.
storePayload bool Store the content payload for later inspection.
testSend bool Use the verified test-recipient path without billing.
scheduledAt string ISO 8601 time for a send at least one minute in the future.
validateRecipient bool Validate the address before provider dispatch.
idempotencyKey string Supply your own key; one is generated if omitted.

For full control over the request body, use the escape hatch:

Broadcasts

Create, send, and manage broadcasts to a list or an explicit recipient set:

List, fetch, cancel, and delete:

Create and fan out in a single call with bulkSend():

create() accepts name, fromEmail, subject, bodyHtml, bodyText, templateId, messageType, audienceListId, listIds, excludeListIds, recipients, scheduledAt, and sendNow. bulkSend() accepts the same content and audience fields but always fans out immediately, so it does not accept scheduledAt or sendNow.

Pass listIds to send to several contact lists at once, and excludeListIds to subtract a list from that audience.

Billing checkout

Checkout accepts starter, pro, growth, or scale, with a month or year billing period. It returns a CheckoutResult for both successful outcomes:

Messages and pagination

Fetch a single page, including the cursor for the next one:

Or let the SDK walk every page for you. list() returns a Generator that auto-paginates through next_cursor:

page() and list() accept the same filters: status, search, from, to, limit, cursor.

Fetch a single message with its full event timeline, by id or by the idempotency key from the original send:

Webhook verification

Verify the authenticity of an inbound webhook with Sendara\Webhooks::verify(). Pass the raw request body (the exact bytes received — never a re-encoded object), the request headers, and your signing secret. On success it returns the decoded JSON payload; on failure it throws WebhookVerificationException.

Verification recomputes HMAC-SHA256(secret, "<timestamp>.<rawBody>") and compares it in constant time against the Sendara-Signature header. It also rejects requests whose Sendara-Timestamp falls outside a tolerance window (default 300 seconds). Pass a fourth argument to change the tolerance, or 0 to disable the timestamp check:

Headers are matched case-insensitively, so framework-normalized header maps work as-is.

Error handling

Every non-2xx response throws Sendara\Exception\ApiException, which extends Sendara\Exception\SendaraException. The API's { "error": { "code", "message" } } envelope is decoded onto the exception:

Catch ApiException for failed API calls, and SendaraException to also cover client-side problems such as a missing API key, JSON encoding failures, or network errors that exhausted retries.

Laravel

The package ships a service provider and facade and is auto-discovered — no manual registration needed.

Set your credentials in .env:

Optionally publish the config file to config/sendara.php:

Use the Sendara facade anywhere:

The underlying Sendara\Client is bound as a singleton, so you can also resolve it via dependency injection:

The facade and client expose the same resources: emails, broadcasts, messages, contacts, lists, domains, templates, suppressions, usage, apiKeys, and billing.

License

MIT


All versions of sendara with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-curl Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sendaramail/sendara contains the following files

Loading the files please wait ...