Download the PHP package netglue/laminas-postmark-transport without Composer

On this page you can find all versions of the php package netglue/laminas-postmark-transport. 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 laminas-postmark-transport

Postmark Mail Transport for Laminas

PHPUnit Test Suite Type Coverage

Introduction

This lib provides a mail transport for use with Laminas\Mail and Postmark’s transactional email service. It also provides email message validators to help make sure that messages you send via Postmark are acceptable - I'm quite pleased with the validator that checks the from address is listed in the verified postmark domains on your account, or amongst the configured sender signatures.

Installation

If you are using this in an app built with Expressive/Mezzio then the config provider should get injected automatically for you during installation by way of the Laminas component installer. If you're using Laminas MVC then you might have to take extra steps to get the default config fired up.

One of the dependencies is a tiny package netglue/psr-container-postmark - this is what's used to configure the official Postmark API client so you can find some additional info in the README in that lib for configuring your account and server tokens for the service.

Usage

By default, assuming use of Laminas Service Manager for your DIC, you will be able to retrieve your transport using either:

As with all mail transports, you'll only interact with it to send a Laminas\Mail\Message:

Read up on the docs specific to sending mail with Laminas components here...

The main reason that I put this lib together is so that I could validate messages before dispatching them to the API to surface common errors such as an invalid sender address, too many recipients etc. The transport accepts a validator in its constructor arguments that is used to enforce the constraints placed on sending mail with Postmark specifically.

There is a default validator chain that you can inspect covering most of these constraints and a shipped FromAddressValidator that is not used by default. The reason this one isn't initially enabled is because it makes API calls to the account endpoints to retrieve the configured sending domains and email addresses and then checks that the From header of the message is amongst the verified senders.

So, to use this validator, you'd need to:

Hopefully the following configuration should illuminate what's required...

Finally, this lib also has a dependency on netglue/laminas-mail-utils which is primarily a collection of more generic validators for mail messages and message behaviours that are intended for use with other vendors such as SparkPost, MailGun etc. If/when you build your custom validator chain, there are a bunch of validators there that might be useful.


All versions of laminas-postmark-transport with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1 || ~8.2 || ~8.3
laminas/laminas-mail Version ^2.11.0
laminas/laminas-mime Version ^2.9.1
laminas/laminas-validator Version ^2.23.0
myclabs/php-enum Version ^1.8.4
netglue/laminas-mail-utils Version ^0
netglue/psr-container-postmark Version ^1.6.0
psr/cache Version ^1.0 || ^2.0.0 || ^3.0.0
wildbit/postmark-php Version ^4.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 netglue/laminas-postmark-transport contains the following files

Loading the files please wait ....