Download the PHP package genilto/sbmailer without Composer

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

SBMailer

A small layer created to abstract the ways to send emails with php.

Email Adapters

This project contains a small abstraction for email sending process. It uses adapters to allow the implementation of any email sending provider. Currently, there are some adapters implemented, as below.

The first step is require the sbmailer package to your project:

After that, you must install the corresponding SDK according to the adapter you are going to use, and then configure as default adapter.

To do that, you must define a constant named SBMAILER and set the default parameters.

See the examples bellow.

Postmark

Send emails using the Postmark API library.

To use this adapter you must require the following dependencies in your project:

And then configure the default adapter like bellow:

PHPMailer

Send emails using the PHPMailer library. This particular adapter allow you to not inform params, so PHPMailer will use php mail() function to send emails.

To use this adapter you must require the following dependencies in your project:

And then configure the default adapter like bellow:

Send Using mail() function

Send Using SMTP

Sendgrid

Send emails using the Sendgrid API library.

To use this adapter you must require the following dependencies in your project:

And then configure the default adapter like bellow:

Mailersend

Send emails using the Mailersend API library.

To use this adapter you must require the following dependencies in your project:

And then configure the default adapter like bellow:

Sendinblue

Send emails using the Sendinblue API library.

To use this adapter you must require the following dependencies in your project:

And then configure the default adapter like bellow:

Microsoft Graph

Send emails using the Microsoft Graph API library.

To use this adapter you must require the following dependencies in your project:

And then configure the default adapter like bellow:

Test environment

The library allow you to set the environment as test. That means that you can define a default email address where the emails will be redirected when in test environment.

Below is an example of an entire configuration, with multiple email providers and defining postmark as the default email. Also, defining the environment as test, with a default email and name where all the test emails will be delivered.

Setting 'env' as 'test' it will be required that you set test_address as well. All messages will be redirected to the test_address and a message with all recipients will be appended to the message body.

How to implement new Adapters

You can implement new adapters just implementing the interface iSBMailerAdapter giving it a unique name and class name. See the existing adapters to a better undertanding.

Setup before run the examples

Before run the examples, you need to install the dependencies of each adapter you intend to use.

This project install the dependencies using composer. Make sure you have composer installed.

Install all the dependencies as described above.

In developer environments, just run:

All the dependencies for all the adapters will be installed.

How to run the example

You can run directly using some local server, as apache and php, just pointing the server to html folder of the project.

Or you can run it using docker. There is a docker-composer.yml in the project that creates a container, pointing the server to the html folder of the project.

Before run the composer, duplicate the file env.sample and rename to .env. After that configure the environment variables there with the correct values.

To create the container just use the command below in your terminal:

To test the example, just go to http://localhost:85 in your browser. If you have configured the correct informations, you can use the form to send a test email.

Manually Install and use in production

Download the latest release file (zip) from github releases. Unzip in your server and import sbmailer/SBMailer.php in your code. It would require all it needs to run.

For production

For production, you must run:

Just basic dependencies will be installed, and you must require the desired dependency as described above.

You must remove the html folder from the final version that goes into production case it is there. It contains a form to test email sendings, and it is not good let it it public in your server.

By the way, the suggestion is keeping this library out of public directory, and just requiring sbmailer/SBMailer.php in your code.

Create new Releases

To generate a new release:

First you need to install composer dependencies of desired adapters, as mentioned above, and then, generate the package:


All versions of sbmailer with dependencies

PHP Build Version
Package Version
Requires analog/analog Version ^1.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 genilto/sbmailer contains the following files

Loading the files please wait ....