Download the PHP package yozaz/laravel-swiftmailer without Composer

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

Laravel and Swift Mailer integrator

Latest Stable Version Total Downloads License

WAS Deprecated...

This package was deprecated, as starting from Laravel 5.0 and above, original Mail class automatically theoretically reconnects on every message. See commit here: [Force reconnection to fix mailing on daemon queues] (https://github.com/laravel/framework/commit/af8eb1face000f82e5c85e6eb822075fc313cbb9).

However, it looks like just calling stop on a transport doesn't do full reset, therefore may throw an error - see discussion here: https://github.com/laravel/framework/issues/4573#issuecomment-211889196


Package, which tries to solve long-term daemon worker issue. For reference:

Compatible with Laravel 4th and 5th versions.

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require yozaz/laravel-swiftmailer.

Next, update Composer from the Terminal:

Once this operation completes, the next step is to add the service provider. Open app/config/app.php (or config/app.php), and add a new item to the providers array.

The final step is to replace Laravel's native Mailer Facade with the one, provided in a package. Open app/config/app.php (or config/app.php), and replace "Mail" alias with:

That's it! You're all set to go.

About

This package works in two possible error-safe modes: sends STOP command after every email is sent, and/or sends RESET/STOP+START commands before every email is sent. As a default, both modes are activated (so called "aggressive" mode). Such approach ensures SMTP connection is closed to avoid timeouts and broken pipes, or maintains it active for whole application living cycle. This is extremely important for long-living applications. E.g. when emails are sent through Beanstalkd + Supervisor + Laravel Queue Daemon Worker architecture, Laravel application never quits - therefore SMTP connection is kept active and timeouts after some time. Stopping, resetting and/or restarting SMTP connection automaticaly solves this problem in general.

N.B. While auto-reset feature is great, sometimes it's not a preferred behaviour. Be sure to check your SMTP server configuration before using this package.

Usage

Package is built in a way, that nothing special needs to be done. It's basically a wrapper, so all Mailer::send() and similar functions will work out of the box.

Auto-reset

Package starts, stops or resets SMTP adapter every time when email is sent. You can manipulate this through special helper functions:

You can switch between STOP or RESET behaviours using native constants as a flag:

It is possible to stop or reset SMTP adapter explicitly.

Silent mode

By default, failed emails will throw an Exception. If that's unexpected behaviour - e.g. because you don't need retry sending it - you can turn this mode on.

N.B. Even if email will fail, before carrying over an Exception, package will try sending STOP command anyway (if such mode is enabled).

Initialization

Package has separate IoC binding. N.B. This package does not overwrite 'mailer' IoC binding in Laravel for legacy purposes.

If you prefer object initialization against Facades, you can instantiate Mailer class by yourself, with additional parameters if required. Package will try to instantiate required objects automatically as defaults.

Optinally, if you have custom wrapper for Laravel's Mailer, or want to manipulate with auto-reset functionality, you can pass additional parameters to IoC binding or class instantiation. Take a look at class constructor for details.

Setting custom mailer instance

To set custom mailer instance, call this method:

Credits

All credits go to xdecock, author of Swift Mailer, for providing ready-made solution implemented in this package.

License

Laravel-SwiftMailer package is open-sourced software licensed under the MIT license.


All versions of laravel-swiftmailer with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version >=4.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 yozaz/laravel-swiftmailer contains the following files

Loading the files please wait ....