Download the PHP package s-mailer/sdk without Composer

On this page you can find all versions of the php package s-mailer/sdk. 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 sdk

S-Mailer PHP SDK

PHP SDK for the S-Mailer API — send messages across SMS, email, WhatsApp and more, list sent/received messages, check your balance, and verify webhooks.

Status: pre-1.0. All resource methods are implemented; the API may still change before 1.0.0.

Requirements

Installation

If you don't already have a PSR-18 client installed:

Authentication

Every request authenticates with your X-Client-ID / X-Client-Secret pair. Find them in your S-Mailer dashboard.

Usage

Send a message

List and fetch messages

Retrigger / delete

Balance, profile, channels

WhatsApp advanced (media, buttons, location, contact, reactions)

For WhatsApp senders only. Text is billed at the outbound cost; media/buttons/location/contact/reactions at the advanced cost.

Configuration

Pass a third $options array to tune the client:

Retries use an exponential backoff and honour a Retry-After header on 429.

Webhooks

S-Mailer signs every webhook it sends with X-Mailer-Signature: hex(HMAC-SHA256(webhook_signing_key, raw_body)). Your webhook_signing_key comes from GET /api/v1/client ($mailer->balance->profile()). Verify over the raw request body, before decoding it.

Two payload shapes are delivered, distinguished by their fields:

Errors

Non-2xx responses raise a \SMailer\Exception\SMailerException subclass carrying the API error code (->errorCode) and HTTP status (->statusCode):

Status Exception (\SMailer\Exception\…) error
401 AuthenticationException AUTHENTICATION_FAILED
403 ForbiddenException FORBIDDEN
400 BadRequestException / ValidationException BAD_REQUEST / VALIDATION_ERROR
402 InsufficientTokensException INSUFFICIENT_TOKENS
404 NotFoundException NOT_FOUND
429 RateLimitException (->retryAfter) RATE_LIMIT_EXCEEDED
5xx ServerException INTERNAL_SERVER_ERROR

Network/transport failures raise NetworkException.

License

MIT — see LICENSE.


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
php-http/discovery Version ^1.19
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0
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 s-mailer/sdk contains the following files

Loading the files please wait ...