Download the PHP package waavi/mailman without Composer

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

Better email for Laravel 5

Latest Version on Packagist Build Status Total Downloads

Introduction

Mailman has all of Laravel's Mail features, plus allows you to:

- Keep your email css files in an external file, and automatically inline them when sending an email.
- Set the language in which the email should be sent, without affecting the rest of your application.
- Avoid the annoying use of callbacks.

WAAVI is a web development studio based in Madrid, Spain. You can learn more about us at waavi.com

Laravel compatibility

Laravel translation
4.x 1.2.x
5.0.x 2.0.x
5.1.x 2.0.x
5.2.x 2.0.2 and up
5.3.x 2.0.3 and up

Installation

Require through composer

composer require waavi/mailman 2.0.x

Or manually edit your composer.json file:

"require": {
    "waavi/mailman": "2.0.x"
}

Publish the configuration file:

php artisan vendor:publish

In config/app.php, add the following entry to the end of the providers array:

\Waavi\Mailman\MailmanServiceProvider::class,

And edit the aliases array to include:

'Mailman' => \Waavi\Mailman\Facades\Mailman::class,

Usage

Basic example

Usage is very similar to Laravel's Mail, with no callbacks needed. In fact, Mailman is expected to be used just like you use Views. Say you have an email view in views/emails/email. You may send the email by:

Mailman::make('emails.email')->to('[email protected]')->subject('test')->send();

The from address and general email configuration will be loaded from app/mail.php, whereas email stylesheet configuration is done through the mailman.php config file.

Passing data to an email's view

Say you want to pass data to the view, you may do so in two ways: through the make method and the with method, just like in Views:

Mailman::make('emails.welcome', array('user' => $user))->to('[email protected]')->subject('welcome')->send();
Mailman::make('emails.welcome')->with(['user', $user])->to('[email protected]')->subject('welcome')->send();
Mailman::make('emails.welcome')->with('user', $user)->to('[email protected]')->subject('welcome')->send();

Setting the locale

To set the locale in which the email should be sent, you may use the set locale method:

Mailman::make('emails.basic')->setLocale('es')->to('[email protected]')->subject('hello')->send();

Setting the css file to use

You may set a different css file than default. The parameter must be the full path relative to the base folder:

Mailman::make('emails.basic')->setCss('resources/assets/css/private.css')

Queue emails

You may queue emails just like with Laravel's Mail. To send an email through a queue:

Mailman::make('emails.basic')->to...->queue()                  // Queue in default queue.
Mailman::make('emails.basic')->to...->queue('queue_name')      // Queue in queue_name queue.
Mailman::make('emails.basic')->to...->later(5)                 // Send email after 5 seconds.
Mailman::make('emails.basic')->to...->laterOn(5, 'queue_name')

Fake sending email

If you are using Laravel's Homestead, the recommend way would be to install MailCatcher.

Get the email as a string

For debugging, it is often useful to be able to print the contents of an email. With Mailman you may get the body of the email using Mailman::show()

Mailman::make('emails.basic')->to('[email protected]')->subject('hello')->show();

Common methods (Illuminate\Mail\Message)

All methods in Illuminate\Mail\Message are available through Mailman:

Mailman::make('emails.basic')->to('[email protected]')
Mailman::make('emails.basic')->to('[email protected]', 'John Doe')      // Set the recipient.

Mailman::make('emails.basic')->from('[email protected]')
Mailman::make('emails.basic')->from('[email protected]', 'John Doe')    // Set from field.

Mailman::make('emails.basic')->sender('[email protected]')
Mailman::make('emails.basic')->sender('[email protected]', 'John Doe')  // Set sender.

Mailman::make('emails.basic')->returnPath('[email protected]')          // Set return path.

Mailman::make('emails.basic')->cc('[email protected]')
Mailman::make('emails.basic')->cc('[email protected]', 'John Doe')      // Add carbon copy.

Mailman::make('emails.basic')->bcc('[email protected]')
Mailman::make('emails.basic')->bcc('[email protected]', 'John Doe')     // Add blind carbon copy.

Mailman::make('emails.basic')->replyTo('[email protected]')
Mailman::make('emails.basic')->replyTo('[email protected]', 'John Doe') // Add reply to.

Mailman::make('emails.basic')->subject('Subject text')            // Add subject

Mailman::make('emails.basic')->priority(5)                        // Set priority level

Mailman::make('emails.basic')->attach('file/test.pdf', $options)  // Attach file

Mailman::make('emails.basic')->attachData($data, $name, $options) // Attach in-memory data

Mailman::make('emails.basic')->embed('file/test.jpg')             // Embed file and get cid

Mailman::make('emails.basic')->embedData($data, $name, $contentType)  // Embed data

All versions of mailman with dependencies

PHP Build Version
Package Version
Requires tijsverkoyen/css-to-inline-styles Version 2.*
illuminate/view Version >=5.1 <5.6
illuminate/support Version >=5.1 <5.6
illuminate/queue Version >=5.1 <5.6
illuminate/mail Version >=5.1 <5.6
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 waavi/mailman contains the following files

Loading the files please wait ....