Download the PHP package shawnmccool/minimal-php-postmark-sdk without Composer

On this page you can find all versions of the php package shawnmccool/minimal-php-postmark-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 minimal-php-postmark-sdk

Minimal PHP Postmark SDK

A minimal PHP Postmark SDK that enables you to send single and batched email through the PostmarkApp.com service.

Design

To maintain reliability, some objects are used for data (such as email and metadata) so that they can ensure that either the data conforms to specification or the developer is made aware of it as quickly as possible.

Install

Creating Mailings

The Mailing class represents a single instance that will be sent to a single recipient.

Simple Mail

To, from, subject, and body.

Tags and Metadata

Configure message tags and metadata for link each mailing to entities, events, etc.

File Attachments

Multiple files can be attached.

Postmark Templates

Instead of specifying a subject line and html body you can use the Postmark template feature. Build the template in the Postmark user interface and specify either its id or alias in the mailing.

or

Postmark templates allow for variables. Create a template model to fill those variables.

Named Parameters

There's a number of options when creating a mailing. It could be possible to make a more rich and complex object model to reduce the need for optional constructor arguments. But in the name of simplicity and the fact that the class is feature complete we're going to leave it how it is.

If you don't like the empty arguments you can create a wrapper class, or you might prefer to use named parameters.

Sending Mailings

The Postmark API

You'll need a server token from postmark.

The PostmarkApi class handles interactions with the Postmark API.

Single Mailing

Sending a single mail is different from sending a batch. The response is an instance of SuccessResponse or ErrorResponse.

Batch Mailing

A batched mailing is an array of mailings that will be sent to the Postmark api in chunks. This prevents new connections to the api being made for each and every mailing. By default the batch mailing will send chunks of 500 mailings at once; but this can be configured.

Development

Development can be done on any machine running at least PHP 8.0. Set up the machine yourself or use the virtual-machine provided.

Running the Tests

The idea here is to test everything that doesn't have side effects against the Postmark API.

The Virtual Machine

The virtual machine may help if you don't have PHP 8.0 on your computer or if you want to avoid some kind of versioning collision etc. This will create an emulated server inside your computer that is configured for development of this package.

For the most part this should not be necessary.

Install modern versions of the following on your computer.

Run the following in the repository's directory.

The virtual machine will initialize. Afterwards enter the virtual machine and run the tests to validate the setup.


All versions of minimal-php-postmark-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8
ext-curl 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 shawnmccool/minimal-php-postmark-sdk contains the following files

Loading the files please wait ....