Download the PHP package webiny/mailer without Composer

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

Mailer Component

The Mailer component enables you to send emails using different supported protocols.

Install the component

The best way to install the component is using Composer.

For additional versions of the package, visit the Packagist page.

Usage

Current supported protocols are:

To use the component, you first need to configuration set inside the component config file. If you open the ExampleConfig.yaml you can see two example configuration sets, Demo and Gmail. Follow this example to create your own set.

Here is an example configuration:

You can have unlimited configuration sets.

To register the config with the component, just call Mailer::setConfig($pathToYamlConfig).

Depending on defined Transport.Type other transport parameters are required.

Configuration parameters

The Mailer configuration consists of several parameters that are explained in the next few sections.

Note: Some of the configuration parameters are bridge-specific, like the AntiFlood parameter. The default bridge is the SwiftMailer, which of course supports the AntiFlood measures.

Character set (CharacterSet)

This is the default character set that will be used in encoding your email content. By default the character set is set to utf-8 which supports most language characters. You might need to change this for some languages, for example, like Japanese.

Sender (Sender)

This is the default sender that will be set on your outgoing emails.

Transport (Transport)

The transport configuration block consists of following parameters:

These parameters are needed only in case of a SMTP connection:

AntiFlood (AntiFood)

Some mail servers have a set of safety measures that limit the amout of emails that you can send per connection or in some time interval. This is mostly to discourage spammers to user their services, but sometimes that might cause a problem even for non-spammers. In order to avoid falling into these safety measure the AntiFood parameter can limit how many emails you can send per connection and how much time you have to wait until you can establishe a new connection.

Don't worry about disconnecting, connecting again and resuming the sending of emails...this is all fully authomized and you don't have to do anything.

The AntiFood param consists of two attributes:

Usage

Using the Mailer component is quite simple, just implement the MailerTrait, build your message and send it.

Here is one simple usage example:

Now if you have multiple senders, and let's say you want to send all of them the same email, but just with a little difference, for example that in each email you put the name of the specific user.

Bridge

The default bridge library is SwiftMailer (http://swiftmailer.org/).

If you wish to create your own driver ,you need to create three classes:

Resources

To run unit tests, you need to use the following command:

$ cd path/to/Webiny/Component/Mailer/
$ composer.phar install
$ phpunit

All versions of mailer with dependencies

PHP Build Version
Package Version
Requires php Version ^7
webiny/config Version ~1.6
webiny/std-lib Version ~1.6
webiny/storage Version ~1.6
webiny/event-manager Version ~1.6
swiftmailer/swiftmailer Version 5.2.1
mandrill/mandrill Version ~1.0
sendgrid/sendgrid Version ~2.2
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 webiny/mailer contains the following files

Loading the files please wait ....