Download the PHP package sendpost/sendpost_php_sdk without Composer

On this page you can find all versions of the php package sendpost/sendpost_php_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 sendpost_php_sdk

SendPost PHP SDK

The official PHP SDK for SendPost - a powerful email API service for sending transactional and marketing emails with advanced tracking and analytics.

Packagist Packagist

What is SendPost?

SendPost is an email delivery service that helps you:

Requirements

Installation

The SendPost PHP SDK is available on Packagist, making installation quick and easy.

Method 1: Install via Composer (Recommended)

Composer is the recommended way to install the SendPost PHP SDK.

Step 1: Install Composer

If you don't have Composer installed, download it from getcomposer.org.

Step 2: Install the SDK

Run the following command in your project directory:

This will automatically download the SendPost PHP SDK and all its dependencies from Packagist.

Step 3: Include the autoloader

In your PHP file, include the Composer autoloader:

That's it! You're ready to use the SDK.

Method 2: Install from GitHub Repository

If you need to install directly from the GitHub repository (for example, to use a specific branch or version):

Create or edit your composer.json file and add the SendPost SDK repository:

Then run:

Method 3: Manual Installation

If you prefer not to use Composer:

  1. Download the SDK files from the repository
  2. Place them in your project directory
  3. Include the autoloader:

Note: Manual installation requires you to manage dependencies yourself. We strongly recommend using Composer.

Quick Start

Here's a simple example to send your first email:

Getting Your API Key

Before you can send emails, you need an API key:

  1. Sign up for a SendPost account at app.sendpost.io/register
  2. Log in to your account
  3. Navigate to the API Keys section
  4. Copy your Sub-Account API Key

Important: Keep your API key secure and never commit it to version control. Use environment variables or a configuration file that's excluded from git.

Common Use Cases

Sending a Transactional Email

Transactional emails are triggered by user actions (order confirmations, password resets, etc.):

Sending a Marketing Email

Marketing emails are sent to multiple recipients for campaigns and newsletters:

Adding a Sending Domain

Before sending emails, you need to add and verify your sending domain:

Getting Email Statistics

Monitor your email performance:

Authentication

SendPost uses API keys for authentication. There are two types of API keys:

Sub-Account API Key (X-SubAccount-ApiKey)

Used for most common operations:

Account API Key (X-Account-ApiKey)

Used for account-level operations:

Which key do I need?

You can find both keys in your SendPost dashboard under API Keys.

Error Handling

Always wrap API calls in try-catch blocks:

Common error codes:

Available API Classes

The SDK provides classes for different operations:

Complete Example

See the example project for a complete working example that demonstrates:

API Documentation

For detailed API documentation, see:

Testing

Run the test suite:

Support

Need help?

License

This SDK is open source. See the LICENSE file for details.

Version


All versions of sendpost_php_sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.3
guzzlehttp/psr7 Version ^1.7 || ^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 sendpost/sendpost_php_sdk contains the following files

Loading the files please wait ...