Download the PHP package svb/mailing without Composer

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

SVB Mailing

This bundle has been developed in order to send mails from multiple systems without writing a single line of html nor care about any localizations.

How to install/configure

  1. composer require svb/mailing
  2. Make sure the bundle is correctly registered in either config/bundles.php (sf4/5) or app/AppKernel.php:registerBundles (sf3)
  3. Add a configuration for the bundle like this:

How to use

  1. Inject the service svb_mailing.mailer (SVB\Mailing\Mailer when using the sf auto wiring)
  2. Create one or more mail objects using one of the many mail templates located within the namespace SVB\Mailing\Mail\
  3. Pass your object(s) into the sendMails method of the svb_mailing.mailer service
  4. You mail should either been sent, or you should have got an exception what to do

Adding Mail Templates

  1. Create a new class implementing MailInterface (AbstractMail to make your life a bit easier)
    Hint: Mail Templates do not necessarily need to be in one folder, use sub directories to order them!
  2. Add the template to the parameter "svb_mailing.mail_identifiers" (identifier string => fully qualified classname)

Pro tip: Definitely consider creating a reusable bundle for your templates, that way you can use your templates across all projects!

Asynchronous resending of failed messages

Since most provider handle sent messages using message queues, most responses for a "send" request will return "200 OK". The mailing bundle provides easy functionality for checking message states and resending failed messages using a database to store all messages and their states. Since the worker for this needs to be executed asynchronously, we implemented a symfony command for this: bin/console svb:mailing:worker. Make sure this command is executed at least once every hour (the more frequent it's executed the better!) to ensure your mails getting resent, and the states are updated correctly.


All versions of mailing with dependencies

PHP Build Version
Package Version
Requires mailjet/mailjet-apiv3-php Version ^1.0
symfony/dependency-injection Version ^3.4|^4.3
symfony/http-kernel Version ^3.4|^4.3
symfony/config Version ^3.4|^4.3
doctrine/dbal Version ^2.0|^3.0
symfony/console Version ^4.0|^5.0
ext-json 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 svb/mailing contains the following files

Loading the files please wait ....