Download the PHP package hydreflab/laravel-mailer without Composer

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

Laravel Mailer

Wrapper with unified interface for sending emails with Mandrill or SendGrid with use of templates mechanism.

Overview

This package provides wrapper for both Mandrill and SendGrid email sending engines and utilizes possibility to send emails with use of already prepared templates.

For more info, please check:

Both mailers have unified interface, so changing your email sending engine is pretty painless.

Package also adds possibility to configure your Mandrill templates in the code and then seed them into your Mandrill account. Possibility to seed templates into SendGrid is work in progress.

Compatibility

Package is compatible with Laravel 5.2.

SendGrid

New SendGrid API has some downsides when it comes to sending emails to multiple recipients. In order not to break anything, SendGrid mailer treats all recipients as of to type.

For more information, please check https://github.com/sendgrid/sendgrid-php#please-read-this.

Installation

Version >= 2.0

  1. Add hydreflab/laravel-mailer to your composer.json:

    • If you will be using Mandrill, add weblee/mandrill to your composer.json:

    • If you will be using SendGrid, add sendgrid/sendgrid to your composer.json:
  2. Add DeSmart\Mailer\MailerServiceProvider::class to your config/app.php file.
  3. Publish mailer configuration: php artisan vendor:publish. This will create config/mailer.php file.
  4. Mailer configuration is based on .env entries:

  5. (Mandrill usage only) If you want to use templates create/update functionality:
    1. Add DeSmart\Mailer\Mandrill\MandrillTemplatesSeedCommandServiceProvider::class to your config/app.php file.
    2. Publish Mandrill templates configuration: php artisan vendor:publish. This will create config/mandrill-templates.php file where you can configure your Mandrill templates. This configuration is used by mandrill_templates:seed artisan command.
    3. Important Step 5.i & 5.ii should be done after installing Mailer package - this is because template seeder uses mailer configuration which has to be published first.

Version < 2.0

Package implements wrapper only for Mandrill.

If possible, please use version >= 2.0

  1. Add hydreflab/laravel-mailer to your composer.json:

  2. Add DeSmart\Mailer\ServiceProvider\MandrillServiceProvider::class to your config/app.php file.
  3. Publish Mandrill templates configuration: php artisan vendor:publish. This will create config/mandrill-templates.php file where you can configure your templates. This configuration is used by mandrill_templates:seed artisan command.
  4. Mandrill mailer uses configuration for default sender email and name. You can find it inside config/mail.php file:

  5. Set up proper API key in your .env file:

Interface overview

Package provides unified interface for both mailers:

Recipient object

Recipient object describes details of recipient.

Recipient object takes three arguments:

RecipientType object

RecipientType object describes type of recipient - is he either:

RecipientType object is simple value object with named constructors:

Variable object

Variable object describes details of variable that is used for personalizing email content. Variable (defined by its name) is placed in email templates.

Variable object takes two arguments:

Header object

Header object described SMTP header details. for more details about acceptable headers, check Mandrill/SendGrid API docs.

Header object takes two arguments:

Attachment object

Attachment object contains data about file attached to the message. Content set in object should be in plain text.

For Mandrill, content is base64 encoded when passed to API.

For SendGrid, temporary file with content is created, then path to this file is passed to API. After message is sent, temporary file is deleted.

Attachment object takes three arguments:

Usage

PHP

Mandrill templates

In order to configure your templates, edit config/mandrill-templates.php file:

When your configuration is ready, you can run php artisan mandrill_templates:seed command to create and/or update Mandrill templates.


All versions of laravel-mailer with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
illuminate/console Version 5.*
illuminate/support Version 5.*
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 hydreflab/laravel-mailer contains the following files

Loading the files please wait ....